events

Problem with Events on AJAX-heavy page

I have an asp page that uses jQuery ajax to load member counts into a bunch of divs after a page is loaded. It works perfectly well in FireFox, and with clients that have a small number of groups. For the small number of clients that have many groups (500+), I am getting an error in IE. The ajax calls seem to be running synchronously,...

Fire events selectively in C#

class Child { private override void Check_CheckedChanged(object sender, EventArgs e) { if (Check.Checked) { this.addName(this.FirstName); this.disableControls(); } else { this.addAddress(this.address); //this.activatecontrols();// gives erro...

Kohana events, where to place them

I'm trying to understand the event system of Kohana. The only thing i don't understand is, where to place the Event::add code. It should be in a place where it is executed before any events are fired. Or am I missing something? What i want to achieve is to construct a class that is available everywhere, but don't realy want to hack i...

jQuery Event To Detect When Element Position Changes

I would like to know if there is a jQuery event that I can use to determine when a particular DIV's "Top" property has changed. For instance, I have invisible content above a DIV. When that content becomes visible the DIV is shifted down. I would like to capture that event and then use the offset() function to get the X/Y coordinates....

How can I attach a .NET delegate to an mshtml event?

I'm working on an extension (BHO) for Internet Explorer, and having trouble attaching a .NET delegate to the mshtml objects to catch DOM events. I've tried using the events published by the IHTMLElementEvents2_Event, ... interfaces, and that works, but only if I specify the correct type for the DOM element whose events I want to catch. ...

Does anyone know how to listen to build events from an already running cctray process, in C#?

I have made a C# application and I am trying to figure out if I can tap into build events of cctray (cruise control tray)? I don't want to re-invent the wheel, I just want to know when my builds fail or succeed (on a client machine) so than my custom C# application may execute a specific set of routines. ...

How do I handle events from an object saved as a property of a user control?

I have an aspx page that contains a user control. The user control displays a business object and allows the user to edit the object. The user control has a property that holds the object being displayed. Public Property Item() As Widget Get If ViewState("Item") IsNot Nothing Then Return DirectCast(ViewSta...

Events in UserControl

Hi all, I am new to UserControls, and while developing my own control I found a problem with showing events of my control in the property grid at design time. If I have some events in my control I want to see them in Property grid and if I double-click that I want to have a handler, in the same way Microsoft does for its controls. ...

C# Events/Subscriptions .... listen to non-referenced projects

I am developing an application trying to employ the Observer pattern. Basically I have a base form from which various components (forms) can be loaded. The base form references each of the components and some of the components reference each other. If I want one of the components to listen for events raised by the base form (perhaps fr...

How to ensure an event is only subscribed to once.

I would like to ensure that I only subscribe once in a particular class for an event on an instance. For example I would like to be able to do the following: if (*not already subscribed*) { member.Event += new MemeberClass.Delegate(handler); } How would I go about implementing such a guard? ...

What is the best pattern for WPF events?

Hey, i'm extending some WPF controls, and need to implement some custom events. I've read around about the 'event' keyword and method groups, but im not sure how to implement this in code. Would anyone be able to provide a simple example of a custom event/handler/etc? Thanks! ...

A simple eventbus for .net

Hello, I want to make a very simple event bus which will allow any client to subscribe to a particular type of event and when any publisher pushes an event on the bus using EventBus.PushEvent() method only the clients that subscribed to that particular event type will get the event. I am using c#.net 2.0 Any help/pointer would be grea...

Java Listener inheritance

I have a java class which fires custom java events. The structure of the code is the following: public class AEvent extends EventObject { ... } public interface AListener extends EventListener { public void event1(AEvent event); } public class A { public synchronized void addAListener(AListener l) { .. } public synchroni...

Delphi 7 and events

I'm researching a bug that looks like some kind of timing issue and so I'm a bit curious about how events work in Delphi 7. What happens is we get some data sent to our application through a COM interface and it gets handled in an event raised from the COM thread. It seems like the event, which has quite a bit of code in it, takes longer...

Java listener must inherit from java.util.EventListener - why?

In the javadoc it says that EventListener is "A tagging interface that all event listener interfaces must extend." Why is that? What's the significance of making a custom listener implement EventListner? Is there any special handling for EventListner somewhere? ...

Adding event handlers by using reflection

I am adding dynamically controls to page by using LoadControl and Controls.Add. I need somehow to wrap Init and Load event handlers of this loaded controls into my code. So it should be such order of events SomeMyCode() -> Control.Init() -> AnotherMyCode() and the same for Load SomeMyCode() -> Control.Load() -> AnotherMyCode(). My idea w...

Making a control "transparent" to click events

I have a ListBox displaying some items, and in certain modes I "stamp" a kind of watermark across the top of it. I've done this with a Border containing a TextBlock with an Opacity of 0.5. All this works nicely. However, I still want the user to be able to click on the items in the ListBox but if I click on the "stamp" it obviously eats...

WinForms: How to programatically fire an event handler?

i want to programatically invoke an event handler for a control. For example: DateTimePicker dtpLastConsummated; i want to trigger the TextChanged event handler for the dtpLastConsummated, how can i do it? In other languages i would call something akin to: dtpLastConsummated.TextChanged(this, new EventArgs()); but in .NET you can ...

Are event subscribers called in order of subscription?

Is it safe to assume that event subscribers are called in order of subscription? Example: void One(object sender, EventArgs e) {} void Two(object sender, EventArgs e) {} event EventHandler foo; foo += One; foo += Two; Is One() always called before Two() when the event is fired? Edit: You should ofcourse not rely on it, I was just...

Problem in GridView PostBack Events

Hear in row databound onclick event its Printing 'Hi' when i click on any row ...But it has to print 'Hi' on click of 15th row only .....I am facing this problem ...plz reply. protected void dtvExDetails_RowDataBound1(object sender, GridViewRowEventArgs e) { if (e.Row.DataItemIndex == -1) return; e.Row.Attributes.A...