events

Correct useage of OnClick vs. MouseClick events in Winforms using C#

I have a custom control I'm currently developing and realized that my code was being ran twice. Not really a huge issue (it is only a Focus method call) however I would like to understand it. From reading the MSDN description it states that: Fires when the user clicks the left mouse button on the object. So I added the OnClick e...

Could someone explain this interesting ASP.NET HTTP pipeline events behavior?

It is clear that member variables of an ASP.NET page should lose scope every time the page is refreshed. I have the following code to display a grid of "Alerts" with edit capabilities: public partial class Alerts : System.Web.UI.Page { private _WikiSyntaxEngine; protected void Page_Load(object sender, EventArgs e) { ...

Simple java message dispatching system

I'm working on a little Java game in which all sorts of events can happen. There are at least a couple of dozen basic events that various event handlers may be interested in. There are also several places in the code where these events might be triggered. Rather than forcing the event listeners to know which class they need to registe...

C#:: When to use events or a collection of objects derived from an event handling Interface?

I have what I think is a simple "problem" to which I have found a couple of solutions but I am not sure which way to go andn the best practice in C#. I have a master object (say a singleton) instanciated once during the lifespan of the application. This "MasterClass" creates a bunch of new type of objects, say "SlaveClass" every time Ma...

Why do some events in child controls fire in reverse order in the ASP.Net page cycle?

From the ASP.Net Page Lifecycle article on MSDN: Although both Init and Load recursively occur on each control, they happen in reverse order. The Init event (and also the Unload event) for each child control occur before the corresponding event is raised for its container (bottom-up). However the Load event for a container occurs bef...

Scala Swing event framework - where do I add my reactors?

I'm trying to catch a mouse-click even on a Table (which should cause a popup to be shown). The table is inside a ScrollPane which is (in turn) inside a Panel. I have added reactions to all the classes, but I can never seem to actually get a click event to be caught! class MyPanel extends GridBagPanel { val gbc = new GridBagContraints...

Jquery: ajaxSend & ajaxStop events not working?

Hi ... can't seem to get the ajaxSend and Stop to work... These are global variables no? .. but i should be able to use like this... but i never get an alert?? I wanted to use these events to display a ajax animation.. although in my code i wish to position the ajax animation depending what i am doing an what element it is.. ...

PostSharp - automate event subscription and collection addition

A repeating routine task that I would like to solve using PostSharp is event subscription and collection addition. I would like to subscribe parent's object procedure to each child object's event (children are conatained in a List). I would also like to add all Lists from parent to a master List on the parent. What aspec shuld i be using...

why this mysql event can't get run?

mysql> show create event online_event; +--------------+-----------------------------------------+-----------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------------+---------...

What does it mean to "Capture the mouse" in WPF?

On System.Windows.UIElement there is a CaptureMouse() and a paired ReleaseMouseCapture() method. In this WPF DragDrop sample they call CaptureMouse on MouseDown and release it on MouseUp. The documentation in MSDN is about as useless as it comes - "CaptureMouse -> Captures the mouse." In my head before trying it I assumed that it some...

Why not have OnXXX event raiser methods return a value?

Say you have an event raiser method (OnXXX) that raises an event using the CancelEventArgs class is there anything wrong with having the OnXXX method return the value of e.Cancel? For example: Public Sub ProcessFiles(folder as DirectoryInfo) For each file in folder.GetFiles() If OnProcessingFile(New FileEventArgs(file)) Th...

How can I get a list of built-in routed events in WPF

I'm just starting out with WPF and need some help with routed events. I have added a datagrid with some animation, but i can't seem to find anywhere that shows me a list of routed events to use on the datagrid, or any other control for that matter. Seems to be a guessing game so far. I thought the datagrid standard events, such as C...

How to queue multiple events to a single eventHandler in actionscript 3?

Hi, I am building a framework for loading minigames (in swf), and am running into a problem. I currently have a listener that listens for events that the child minigame sends to the parent framework. However, if the child sends two messages (events) too close to each other, it seems that the first event simply get ignored, which causes...

Winform - which is a usercontrol last event to fire

Which is a usercontrol last event to fire when the application/control is loaded? The load event? ...

Non-anonymous function for jQuery: $( ..selector.. ).click( myFunc())

I've been exploring the use of custom functions for event handlers. In this stripped down example, I'm trying to get an alert to pop up when the user clicks a button. But the alert box pops up immediately as the page loads! What am I doing wrong? ( the commented portion does the exact same thing). If I define the bclick() function...

How do i create a bindable event for my custom control?

How do I create an event on my custom asp.net control which can bubble up to its parent? I know how to add events and handle them but where I'm getting a bit stuck is on how to add an event which can be wired up to the parent in a repeater control for example. In the repeater is the control, the onclick event for example connected to t...

Open a new tab firefox

Can anyone help me by telling me how can I capture the URL of a new tab or a new window by using JavaScript in Firefox? ...

How do you handle a ComboBox SelectionChanged in MVVM?

For those doing pure MVVM, how do you handle a ComboBox SelectionChanged event without reverting to code behind? I tried e.g. AttachedBehaviors but Event="SelectedChanged" is not supported: <ComboBox> <ComboBoxItem Content="Test1"> <c:CommandBehaviorCollection.Behaviors> <c:BehaviorBinding Event="SelectionChange...

Why are events and commands in MVVM so unsupported by WPF / Visual Studio?

When creating an WPF application with the MVVM pattern, it seems I have to gather the necessary tools myself to even begin the most rudimentary event handling, e.g. AttachedBehaviors I get from here DelegateCommands I get from here Now I'm looking for some way to handle the ItemSelected event in a ComboBox and am getting suggestions...

Visual Studio 2008. MFC event wizard broken

OK, so it's almost a programming question - The VS2008 dialog event wizard has stopped working. Double-clicking on a button in an MFC dialog project does not fire the wizard as usual and a right-click to get to the 'Add Event Handler...' shows a dialog with no message types. Further to this the MFC message mapping and virtual class li...