handlers

Do you use a query handler? If so, what tasks does it perform for you?

Several months ago my work deployed an in-house function that wraps the standard, php, mysql_query() function with additional options and abilities. A sample feature would be some handy debugging tools we can turn on/off. I was wondering how popular query handlers are and what features people like to build into them. ...

Data disappearing after ItemUpdate in Sharepoint with Office 2007 documents

I have a simple event handler with a ItemAdding event that changes a column value that I need in the ItemUpdated method. After uploading a word 2007 document (*.docx, *.pptx or xlsx) the value of the column is changed, but when I protect the document the value of the column disappears in the ItemUpdated method. This only happens for off...

Is there an actual difference in the 2 different ways of attaching event handlers in C#?

In C# is there any real difference (other than syntax) under the hood between: myButton.Click += new EventHandler(myMemberMethod); and myButton.Click += myMemberMethod; ? ...

event handlers javascript

I have some handlers to resize a box, I want to move the box according to the handle that was selected. What would be the best way of implementing this within the loop for (var j = 0; j < allhand.length; j++) { aaa[allhand[j]].style.visibility = 'inherit'; aaa[allhand[j]].onmousedown = function(e) { document.onmousem...

How to add event handlers to composite panels in GWT 1.6

This is probably a really simple thing, but I don't know how to implement the following. package mods.client.resultSelector; import com.google.gwt.event.dom.client.MouseDownEvent; import com.google.gwt.event.dom.client.MouseDownHandler; import com.google.gwt.user.client.ui.AbsolutePanel; import com.google.gwt.user.client.ui.Composite;...

How can I make a Windows Explorer file preview screen in WPF?

I'm working on an application that will have attachments, and I would like to create a type of display like in windows Explorer, where you choose a "Details" view, and also show the preview pane. I would like to be able to show a thumbnail view of the attached file currently selected, based on the file extension. Does anyone know where...

What's the difference between making a handler w/ ashx/axd and using something I made up myself in ASP.NET?

This is probably very simple but it's really confusing me. When I implement the IHttpHandler, I create a handler and then register it like so in the web.config: IIS6 Portion: <httpHandlers> <add verb="*" path="*.randomextension" type="MyProgramNameSpace.MyHandler" /> </httpHandlers> IIS7 Portion: <handlers> <add name="mine" ve...

How can you handle cross-cutting conerns in JAX-WS without Spring or AOP? Handlers?

I do have something more specific in mind, however: Each web service method needs to be wrapped with some boiler place code (cross cutting concern, yes, spring AOP would work great here but it either doesn't work or unapproved by gov't architecture group). A simple service call is as follows: @WebMethod... public Foo performFoo(...) { ...

Microformat (hCard, hCalendar) parsing services

I'm about to write my own .ashx handler to receive hCard data and return a properly-formatted VCF file and - when I get around to it - to handle hCalendar events as well. I know the Microsoft Oomph project does something very similar (in fact, I plan to base much of my work off that service). Are there a range of open services availabl...

call an eventhandler with arguments

Visual Studio 2008, C# 3.0. I have a method below which calls an event handler. I would like to pass the two arguments received by the method to the event handler. I would like to do something like this: wc.DownloadDataCompleted += wc.DownloadedDataCompleted(strtitle, placeid); Is this even possible, if yes, how would I go about do...

How to do Interceptors / Handlers in JAX-WS RI without using annotations?

We are using the Sun RI for JAX-WS (2.1.4) and we have a need for orthogonal web service endpoint interceptors (authentication, extracting SOAP headers for context, etc). Apparently the "normal" JAX-WS way to do this is using the HandlerChain annotation. This however forces us to modify the WSDL (even if we use the separate binding XML...

Writing a file using fopen function.

I wrote the following C program to write data into a file.The program got compiled properly but nothing is getting written in the file.Please suggest modifications if required. #include <stdio.h> #include <errno.h> int main() { int i; FILE *fopen(),*fp; fp = fopen("D:\Satish_SharedSubstance\V13.4-CT_Testing\LONGRUN_Testing\...

Disable user interaction in a GWT container?

I want to disable/enable user interaction (mouse click more specificly) on many widgets like hyperlink, button, etc which are contained in a composite (flextable) there are more than one click handlers, and I don't want to bother with removing and adding listeners according to mode (interaction enabled/disabled) Any ideas would be appr...

Disable existing Eclipse Commands, like Eclipse "F5" for Debug/Default Perspective

I have created a new Perspective with additional views pretty similar to the Eclipse "Debug" Perspective. I have created some commands and key bindings using the extension points extension point="org.eclipse.ui.handlers" extension point="org.eclipse.ui.commands" extension point="org.eclipse.ui.bindings" I have to use "F5" to bind th...

Am I using handlers in the wrong way?

Hey, I've never used HTTP Handlers before, and I've got one working, but I'm not sure if I'm actually using it properly. I have generated a string which will be saved as a CSV file. When the user clicks a button, I want the download dialog box to open so that the user can save the file. What I have works, but I keep reading about modi...

RotatingFileHandler throws an exception when delay parameter is set

When I run the following code under Python 2.6 import logging from logging.handlers import RotatingFileHandler rfh = RotatingFileHandler("testing.log", delay=True) logging.getLogger().addHandler(rfh) logging.warning("Boo!") then the last line throws AttributeError: RotatingFileHandler instance has no attribute 'level'. So I add the ...

Node removal and event handlers

Just interesting... What happens to node's event handlers when I remove it completely from the DOM tree? That means, if I create a node with the same id as removed node later, will it have the same event handlers? ...

Why not use javascript handlers on the body element?

As an answer to the question of 'How do you automatically set the focus to a textbox when a web page loads?', Espo suggests using <body onLoad="document.getElementById('<id>').focus();"> Ben Scheirman replies (without further explanation): Any javascript book will tell you not to put handlers on the body element like that Wh...

Drupal Views api, add simple argument handler

Background: I have a complex search form that stores the query and it's hash in a cache. Once the cache is set, I redirect to something like /searchresults/e6c86fadc7e4b7a2d068932efc9cc358 where that big long string on the end is the md5 hash of my query. I need to make a new argument for views to know what the hash is good for. The rea...

In C#, how can you easily change the name of an event handler?

In VS2008, if I double click on the event handler VS creates a default event handler with a default name, e.g. combobox1_SelectedIndexChanged. Say, for example, i now rename combobox1 to cbStatus. It still has the same event handler, so i now change that to cbStatus_SelectedIndexChanged. Is there a way, where VS can change the initial...