events

Dispatching events between classes

I have a custom event class public class FFTDrawEvent extends Event { public static const DRAW_EVENT:String = "drawEvent"; private var _param:Array = new Array(); public function FFTDrawEvent(type:String, __param:Array, bubbles:Boolean=true, cancelable:Boolean=false) { _param = __param; super(type, bubbles...

jQuery: Event function not taking variable?

if a radio button is selected, i want a div to either show or hide. here is the code: // add event to hide unimportant details when var is disabled and show when enabled $('#companyVar' + companyVarID + 'Enabled').change(function() { $('#companyVar' + companyVarID + 'Unimportant').fadeIn("slow"); }); $('#companyV...

dual click problem...

hello - i've made an image slide show which works with either a next button, or if you click on the right or left of the screen it shows the next slide. problem is when i click the next button the click bind also fires which means it move forward 2 slides. How can i get the click bind to ignore the click if th next button is clicked?! ...

How can I determine if a DataGrid has been sorted or paged, prior to the events being triggered?

I have a DataGrid that has event handlers bound to SortCommand and PageIndexChanged. How can I determine if those event handlers are about to be called, say on page_load? These events will fire just fine after page_load, but I'd like to know at page_load if they are to be fired. ...

How to attach event handler to an event using reflection?

I know about EventInfo.AddEventHandler(...) method which can be used to attach handler to an event. But what should be done if i can not even define proper signature of the event handler, as in, i don't even have reference to the event args expected by the handler? I will explain the problem with the proper code. // Scenario when i hav...

Add event handler in derived class' constructor or override the OnX() method?

When designing a derived class, are there [dis]advantages to adding a handler to a base class event in the ctor vs overriding the OnEventName() method and adding some behaviour (as well as calling the base method), if one doesn't need to change the base method and doesn't care in what order things happen, but only wants a reusable compon...

WPF datagrid selected row clicked event ?

Hi, I want to execute some code when a a selected row of the WPF DataGrid is double clicked. I know that the datagrid has a MouseDoubleClicked event and that it also has a row selected event but I don't see any event for "selected row double clicked" ... Do you think it's possible to capture this event somehow ? Regards, Seb ...

on page load event of *not the focus* tab in Firefox extension

Hi, I develop firefox extension and using the "load" and "DOMContentLoaded" events to raise when document was fully loaded. My problem, however, is that my 'content' variable is always pointing to the focused tab and not to the new loaded tab (for example, when firefox restarts and load several tabs or if you right-click a link and op...

How do I programatically raise an existing event within a custom control?

I have made a custom class by inheriting a DateTimePicker and made some methods that allow it to be blank/null. If the control is blank and a user clicks on it, it populates with the current date. It also raises the ValueChanged event. If the control is populated and a user presses delete, it clears and sets its value to null, but the ...

Hooking into Grails event in order to inject properties and methods without beeing af Plugin

Hi, I have some custom groovy classes in my Grails project, and I would like to inject a logger and some other stuff into the class, like it works in a Service class or Controller class. The code in the "target" class would in this way have direct access to logging without further ado. How would it be possible to write scripts to hook...

How to fire dragend event of a marker in google maps v3?

I want to fire dragend event of a marker in another event say click event on the map. how can I do that? google.maps.event.addListener(map,'click',function(pt){ posSelectMarker.setPosition(pt.latLng); //Here I want to fire dragend event. }); ...

CellDoubleClick event doesnt work after addition of Drag&Drop

After I added drag & drop to a DataGridView, the CellDoubleClick event stopped working. In the CellMouseDown event I have the following code: private void dataGridView2_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e) { var obj = dataGridView2.CurrentRow.DataBoundItem; DoDragDrop(obj, DragDropEffects.Link); } How...

event handler to detect changes in netstat data

I know .net allows a method to detect if your network IP has changed via System.Net.NetworkInformation. I would like to be able to detect changes to the number of TCP or UDP connections to a computer. So instead of scraping the IP end points every x seconds I want the system to notify me of new connections or dropped connections. Are t...

Can AppleScript listen for events?

I want to write a script that takes action when a document is opened on a certain application, or before an application quits, etc. Is there a way to attach a script to an event in an application? Does AppleScript support any form of hooks at all? If not, can I hack my way into getting what I want? ...

pyGTK detect all window move events

I'm trying to capture the configure-event for every window to create a windows 7-esque snap feature. I know there are solutions involving compiz-fusion, but my installation is running within vmware and doesn't have hardware acceleration to run compiz. I figured a simple python script could do what I wanted, but I can't seem to find the r...

Is it possible to attach an event handler before constructing an instance?

My app uses a logging class which is invoked by each module as it is constructed. The logging class fires an event every time a new entry is added, so that the GUI can be updated. Is there any way I can listen to events fired during the construction of an instance? For instance, I currently have this in my calling class: input = new ...

Adobe Flex Timer Event

Hello everyone, I just have a one quick question on Timer and TimerEvent (flash.events.TimerEvent & flash.utils.Timer) of Adobe Flex. I am currently working on a project wherein I need to occasionally change speed, stop and play an swf animation (loaded to a loader and instantiated as a ByteArray). Example, I have a moving car (swf ...

Spring security plugin not throwing events

Hi, I am in the process of migrating to spring security plugin from acegi plugin.Currently working on grails environment. I am facing a weird issue as my authentication success event and authentication bad credentials event does not throw at all.I added println statements in the callback in config.groovy and also through listeners.Howeve...

WPF MVVM call ViewModel Save method on Window Close

Hello, I have figured out how to close Window from my ViewModel. Now I need to solve window close problem from the other side. I need to trigger Save() method in my ViewModel when the user clicks window's close button. I was thinking about binding Command property to Window's close event, but my ViewModel is related to the user cont...

How does one hide content from a user until a stylesheet is loaded and executed?

Hi all smart people! I'm using a jQuery plugin for sliding panes of content. For about 400ms all the page elements flashes up (text, images, etc.) on top of themselves making for a messy garbled jumble...a brouhaha you could say. Then the stylesheet comes along and sorts it all out. But for the sake of professionalism and perfectioni...