events

Javascript: What argument does the function specified in body's onload event get called with?

Similar to this question, my HTML looks like this: <body id="body" onload="loader()"> </body> I always assume, as this doc says, that onload is given no arguments. However, I named the argument, and did some deep inspection, and found that I got an object looking like this: {originalTarget : DOM, preventCapture : function, target :...

Why is event handling in native Visual C++ deprecated?

http://msdn.microsoft.com/en-us/library/ee2k0a7d.aspx Event handling is also supported for native C++ classes (C++ classes that do not implement COM objects), however, that support is deprecated and will be removed in a future release. Anyone knows why? Couldn't find any explanation for this statement. ...

How do I handle click event in Spark List control in Flex 4

I have a s:List component. I want to handle a click event to know what list item is selected. I don't see Click event in s:List. Any workarounds? Thanks. ...

Can you connect Views to eventhandlers using XML?

Sometimes you want to start an Activity by pressing a Button. Is there a way to express that in XML? I.e. to tag the Button xml with the Activity to render when it is clicked? That would certainly be a lot quicker and slicker and shorter than writing the equivalent Java code to handle the event. Peter ...

Why "Live" don't bind to the actual element

I'm facing few problems especially with event bubbling and also with the "live" method. I have a table with few cells and in each cell "td", there is a list and a links "li a". The links have a ".class" associated with them. So I just want to make the links works, I use the live method (because they are created dynamically) $('.aclass...

How to get the x& y value from the touchesbegan to another method

HI How to get the x& y value from the [B]touchesbegan[/B] to our method,i have made the sample like this to get the location of my TextField,and this location was taken in another method to calculate the location of the text and add text to the UIImage,im facing problem in this final stage to pass this parameter to the [B]CGContextShow...

Designing loosely coupled components with GTKs event model.

This is a fairly vague and open ended question, but hopefully someone can still provide some insight. I am using GTK (through Gtk2Hs with Haskell via GHC) and I am wondering if there is any general advice for handling events. I am used to keeping system components loosely coupled (from OO practice) and this extends to the event model. I...

Good resources for learning event driven flash development?

What are good books / site where you can learn the best practices for event driven programming in actionscript (3 obviously). I've got a big project coming up and, to be honest, my flash is usually a big mess of classes and I don't want the the next one to turn into a ball of hair behemoth. ...

C# : Creating Events for a Class on GET/SET properties

I'm looking to fire an event each time a property within my class is SET. I'd like to be able to trigger this same event whenever one of my properties are set. I have (around 12 of them) I.e. public class MyClass { private int _myHeight; private int _myWidth; public int myHeight { get { return myHeight; } set { myHei...

Event not fired when copying entire object. How to do it?

If I have a class that contains some properties and methods, and when a property is changed, it fires an event (in this case passing a string in the args): public class Settings { public delegate void SettingsChangedHandler(object sender, string e); public event SettingsChangedHandler SettingsChanged; private string rootfol...

How to fix the wxpython events called?

Hello, with this code: import wx class Plugin(wx.Panel): def __init__(self, parent, *args, **kwargs): panel = wx.Panel.__init__(self, parent, *args, **kwargs) self.colorOver = ((89,89,89)) self.colorLeave = ((110,110,110)) self.colorFont = ((145,145,145)) self.SetBackgroundColour(self.colo...

jQuery: multiple live event bindings

How do I do the live event (for when new content is injected) with the new way of doing multiple jQuery events: $('.foo', this).bind({ click: function() { //do thing }, mouseover: function() { //do other thing }, mouseout: function() { //do other other thing }, focus: function() { ...

How do I receive notification of a new window opening?

I want to respond to a certain type of new window being opened by an external application. I have some experience finding applications and windows currently open (system wide) using some of the carbon functionality, so could theoretically just check every few seconds. This would require getting a list of all open windows and checking i...

How to unregister from an ActiveX event in JavaScript

I have successfully used the Automagic syntax to register to an ActiveX event from JavaScript. How do I later unregister from the event? Example: function MyActiveXObject::SomeEvent() { alert("event raised!"); } Edit: included example ...

Identify which AlertDialog triggered onClick(DialogInterface dialog, int which)

I'm creating a dialog as follows: @Override protected Dialog onCreateDialog(int id) { switch (id) { case DIALOG_1: return new AlertDialog.Builder(this) .setTitle(R.string.s_dlg1) .setPositiveButton(android.R.string.ok, this) .create(); case DIALOG_2: ... ... } return null; } @Override public void onCl...

Simple ASP.NET/C# Problem - Events

I have a class that inherits from the LinkButton ASP.NET control to include an int "Value" property for remembering a database ID when creating LinkButtons dynamically. This is so I can load some database driven content based on that ID on postback. My question is: Is there a simple way to achieve this in C#? I have had a look around th...

Intercepting Outlook category assignment events?

Note this is not a duplicate of this similar but different question! My question is not how to intercept Category create / rename / delete events, but how to intercept when a user assigns a category to an item (contact, meeting etc). I am just starting to explore the Outlook object model, and I'm struggling to 'get' how it works. Any as...

Executing only the last function called

Hello! This is the setup in short. I have a big table. Everytime a cell get focus an asyncron call to the server is done (with PageMethods) and some data is returned and updates a infobox in the page. I have written code that makes it possible to navigate between cells with the arrow keyes. The problem occurs when I shift focus fast t...

How do you trigger an event across classes?

I am writing a Class Library that will be used by other applications. I am writing it in C#.NET. I am having a problem with triggering events across classes. Here is what I need to do... public class ClassLibrary { public event EventHandler DeviceAttached; public ClassLibrary() { // do some stuff OtherClass....

JavaScript closures and variable scope

I am having trouble with JS closures: // arg: an array of strings. each string is a mentioned user. // fills in the list of mentioned users. Click on a mentioned user's name causes the page to load that user's info. function fillInMentioned(mentions) { var mentionList = document.getElementById("mention-list"); mentionList.innerH...