events

Check if thread is EDT is necessary?

Hello, I have an UI implemented with Swing. One component does some work that may take some time, so I use SwingUtilities.invokeLater. However, I was reading some old code and found this in an ActionListener: if (!SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(new Runnable() { public void run() { ...

javascript window events

I would like to have the following function being able to work on all objects that support events, by passing the corresponding event and not only for onload. function eve(ev, fnc) { if(typeof window.addEventListener!= 'undefined'){ window.addEventListener('load',fnc,false); }elseif(typeof window.attachEvent!='unde...

.NET remoting events sent to individual clients

I have an application that implements a simple timer (among other things). I wanted to use .NET remoting to be able to access the timer elapsed events from multiple other applications running on the same machine. I used: http://www.mctainsh.com/Articles/Csharp/RemoteCallback.aspx#A%5Fsimple%5Fexample as a reference for setting up the ev...

How to hook onclick event for each cell in a table in Javascript?

I was thinking if there's a better solution for adding onclick handler to each cell in a table than this approach: http://stackoverflow.com/questions/1207939/adding-an-onclick-event-to-a-table-row Better in the way that I wouldn't need to set "cell.onclick = function" for each cell. I just need to get the coordinations of a cell where ...

How to set the value of a wx.combobox by posting an event

NOTE: This appears to be an OSX specific problem. The code below demonstrates the problem I am running into. I am creating a wx.ComboBox and trying to mimic it's functionality for testing purposes by posting a wxEVT_COMMAND_COMBOBOX_SELECTED event... this event strangely works fine for wx.Choice, but it doesn't do anything to the Combo...

Object Events, how do are they implemented

Events are really awesome, and I wouldn't know what I would do without them, but they're a mystery to me. I'm talking about events in a sense, a function(s) is called if a property, or value, a special event happens. I have only the vaguest idea how these actually work. I know it's an observer pattern, but I don't truly know how it wor...

How to add a SaveOrUpdateCopy event listener in NHibernate

How can I add a event listener for SaveOrUpdateCopy in NHibernate ? I see that the ListenerType enumeration does not have a 'SaveOrUpdateCopy' type. I tried using the 'Merge' type, but that adds it to the MergeEventListeners collection. The SaveOrUpdateCopy invokes the events from the SaveOrUpdateCopyEventListeners collection. How can I...

Extjs Element component load event not firing in Safari or Chrome

Hi, I am creating an Iframe and adding it to the current document and it is being used as a file download target. Here is the code... var dl = Ext.DomHelper.append(document.body, { tag: 'iframe', id:'downloadIframe', frameBorder: 0, width: 0, height: 0, css: 'display:none;visibility:hidden;height:0px;', src:...

VB.NET: WithEvents not Working

Hello All, I have the following classes: Public Class Email Private Shared ReadOnly EMAIL_REGEX = "\b[a-zA-Z]+[a-zA-Z0-9._+-]+@" + _ "[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}\b" Private _email As String Public Event emailCreated() ' Declare empty constructor private so the only way to create...

signal qt from a non-qt thread, QueuedConnection

hello, I am signaling my Qt GUI thread from a boost::thread, and I am using a Qt::QueuedConnection, connect(src, SIGNAL(signal-signature), dest, SLOT(slot-signature), Qt::QueuedConnection); and still, when I emit the signal my slot does not get called. edit: I found the problem, it seems that I was connecting the signal later then ...

Limited options for accessing events in derived classes?

Im refactoring a class, and moving sections into a base class. I have a few events similar to public event EventHandler GridBinding; Which are now in the base class, but i am finding i cannot now check to see if the event is null in my derived class. Doing so gives me the error: The event 'xyz.GridBinding' can only appear on t...

How to use keyword this in a mouse wrapper in right context in Javascript?

Hi, I'm trying to write a simple wrapper for mouse behaviour. This is my current code: function MouseWrapper() { this.mouseDown = 0; this.OnMouseDownEvent = null; this.OnMouseUpEvent = null; document.body.onmousedown = this.OnMouseDown; document.body.onmouseup = this.OnMouseUp; } MouseWrapper.prototype.Subscribe = funct...

How to send Event signal through Processes - C

Hello all! I have an application consisting of two windows, one communicates to the other and sends it a struct constaining two integers (In this case two rolls of a dice). I will be using events for the following circumstances: Process a sends data to process b, process b displays data Process a closes, in turn closing process b Pro...

Text box loses focus when DIV is hovered

Hello. I have a problem: When I enter a text into suggestion text box, popup panel appears. But when user places mouse over this popup panel with suggestions - text box loses focus. What should I do to prevent losing focus ? Example which have the same behaviour: http://demo.raibledesigns.com/gwt-autocomplete/ Thanks for any help. U...

In SVG is there a way to grab a shape anywhere when it has fill = "none"

I have a series of shapes that I want the user to be able click anywhere on the shape to pick up as part of a drag and drop feature. All of these shapes are bounded by a rectangle. For example: <g id="shape1" fill="none" stroke="black"> <rect x="0" y="0" width="100" height="100"/> <circle cx="50" cy="50" r="50"/> </g> <g id="s...

How to call javascript function from c#

Hi All, I like to call a JavaScript function from c#. Can any one can give me code snippet. More detail... I have a asp.net page which has a asp button. when i click that button, i like to call javascript function. like wise.... in my asp.net page, <button id="save" onclick="i like to call a method resides in asp.net page'>Save</b...

Drupal Event/Calendar Module not storing event time

Hello, all. I have installed a fresh copy of Drupal 6 on an Xampp server. Within that install is a collection of modules for creating an event calendar. There's actually a great instructional video at http://www.youtube.com/watch?v=qO4TeEydtMs for getting all the necessary fields up. So far everything is working except... the events wo...

jQuery - Programmatically Trigger Event

I need to programmatically trigger a click event that's being handled by jQuery. Here's the current code: var $thumbs = $('#PhotoGalleryThumbs .tile'); var $zoom = $('#PhotoGallery #PhotoGalleryZoom img'); var $description = $('#PhotoGallery #PhotoGalleryDescription'); $thumbs.click(function(event) { event.preventDefault(); va...

How can i set handler for IE mouseover event in WSH script

How can i set handler for IE mouseover event in WSH script? This code don't work. var ie = new ActiveXObject("InternetExplorer.Application"); ie.Navigate("about:blank"); ie.Visible = true; function handler() { WSH.Echo("test"); } ie.Document.onmouseover = handler; ...

FLex MouseEvent doesn't fire when Mouse stays over element

Hi, i'm trying to make a scrollable box, when a mouse enters and STAYS on "wrapper"'s area, "pubsBox" moves 10 pixels to the left. <mx:Canvas id="wrapper" height="80" width="750"> <mx:HBox id="pubsBox" horizontalGap="10" height="80" width="100%" /> </mx:Canvas> My problem is that I'm not sure how to make the MouseEvent.MOUSE_OVER ...