Questions tagged [custom-events]

The custom-events tag is an ambigious tag used when a question targets an event in an event-driven system created an maintained by the asker him or her -self.

The custom-events tag is an ambigious tag used when a question targets an event in an event-driven system created an maintained by the asker him or her -self. This tag should be used with care, and only if the question is about creating, triggering or handling an event that is not part of the default event-handling in the "system" or technology that otherwise is at question.

253 questions
0
votes
2 answers

How to create and event handler inside a Singleton class - Javascript

I have the next code: // Singleton var mySingleton = (function () { // Private methods and variables function privateMethod(){ console.log( "I am private" ); } var privateVariable = "Im also private"; return { //…
MartaGom
  • 501
  • 6
  • 27
0
votes
1 answer

Image click in C# WinForms Browser Control

private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { webBrowser1.Document.Body.MouseDown += Body_MouseDown; } void Body_MouseDown(object sender, HtmlElementEventArgs e) { switch…
0
votes
3 answers

C# - issue with custom raising events

I have my class where I define my event: public class EventRaiserUtility { public event EventHandler updateList; public void updateListEvent() { if (updateList != null) { updateList(this, EventArgs.Empty); …
Piero Alberto
  • 3,823
  • 6
  • 56
  • 108
0
votes
1 answer

How can i decouple my networkmanager using events?

i'm writing a program that connects with various TCP network devices. The GUI is made using JavaFX. The whole connection part is in its own package "Network". Roughly described, it looks like this: (I don't know much about UML, no blaming plaese :/…
JohnSmith
  • 33
  • 6
0
votes
1 answer

How to trigger a custom event in capture phase

Is there a way to trigger a custom event in javascript, so that it will propagate using the capture model? I have a hierarchy of elements that I use as a mean to communicate between objects. Each level of the hierarchy represents a sub-family of…
AriehGlazer
  • 2,220
  • 8
  • 26
  • 29
0
votes
1 answer

Custom Event became null on 2nd call

I have written on event in a user control and that user control used twice in a page. Now the problem is, I am getting the Event as null for the 2nd time. Why? How to resolve the issue? Please help. My code like: in ascx: public delegate void…
Tapas Mahata
  • 343
  • 6
  • 22
0
votes
1 answer

How does JQuery create it's Custom Events and can I recreate in Javascript?

I am looking to create events in Javascript using the same methodology as JQuery- Does anyone know how JQuery does it? My reasoning is that using raw Javascript such this: var myEvent = new CustomEvent("userLogin", eventProperties); ...does not…
Oli C
  • 1,120
  • 13
  • 36
0
votes
1 answer

Custom Event in Custom Control (on variable changed)

I'm making a custom control including three buttons. Every button represents a tab. When I click a button to change to the tab corresponding to that tab a variable for the controll is uppdated, this variable is called "selectedIndex". How can I make…
Dave
  • 341
  • 1
  • 4
  • 13
0
votes
1 answer

Actionscript 3.0 - Custom Events with Parameters

Is there any simple -- or suggested -- way in order to send a parameter along with a custom event? Or even just a way to pass variables between two classes? My program is a sort of simple Civ/Age of Empires kind of game, where you can place…
DeanoMachino
  • 59
  • 2
  • 12
0
votes
3 answers

Problems with ASP.NET and custom events

I have a problem when handling the ReceiveCompleted event of a MessageQueue in ASP.NET. It catches it successfully, but every changes applied to the Controls of the page have no effect. This is what I've got: .ASPX
Pablo
  • 3
  • 1
0
votes
1 answer

flex custom event with item renderer and custom component

OK you Flex experts, I need some help. I have a datagrid in my main application with an itemrenderer (mxml). When you press the image in the ir, a custom component (mxml) opens. The cc has a button that is supposed to call a function in the main…
0
votes
0 answers

Firing Custom Event in ActiveX Control Causes IE to crash

In my ActiveX Control, using the Class Wizard, I added a custom event named OutboundCallStateChanged. It generated the following in my OLEControl class: .h file class CIVR60Ctrl : public COleControl { ... public: // Event maps …
Halo
  • 1,524
  • 3
  • 24
  • 39
0
votes
1 answer

Backbone: events from external mediator source

I'm starting implementing Backbone in a web app. The app has already some objects of its own, and also a Mediator (here called EventTools) for cross-object event communication. So for ex. an object subscribes like this: EventTools.add({ …
Luca Reghellin
  • 7,426
  • 12
  • 73
  • 118
0
votes
1 answer

Custom events does not appear even if the are sent

On pageload does I load google analytics through he following code snippet: