events

Why SerialEvent.RI doesn't work?

Hi, I have two computers running this code: import java.io.; import java.util.; import gnu.io.*; public class Deb implements SerialPortEventListener, Runnable{ public static final int TIMEOUTSECONDS = 30; public static final int BAUD = 9600; static String telefono; static Boolean llamar = false; CommPortIdentifier cpiModem = null; ...

IE not allowing onClick event on dynamically created DOM 'a' element

I'm having issues with internet Explorer. I have a link which duplicates a file upload element on a form. The code which duplicates also appends a hyperlink to the duplicated upload element which is supposed to remove the duplicated element a simple remove this link. The issue is that this code runs fine in firefox but it doesn't run at...

Problem with ring event in serial port communication

Hi, I have a modem in a computer where there is running a program that dials a number or waits for a call. When dialing a number the modem works fine, but I doesn't detect the Ring event when it's the one being called. My program is in java and it works perfectly on my laptop with its modem. When I use the modem to receive a fax, it wor...

Passing variables through classes in Objective-C

In my scenario I have 2 view controllers, one tied to the main view and one that is connected to the first one as a subview. Now let's say that my App Delegate class wants to pass a string to the subview controller. What is the best practice to achieve this? If I wanted to pass it to the 1st controller i could just say something like [...

C#: Event not showing up in the Property Grid

I am creating a special search text box. Among other things it have these two events: [Category("Behavior")] public event EventHandler<GenericEventArgs<string>> Search; [Category("Property Changed")] public event EventHandler<EventArgs> ActiveColorChanged; [Category("Property Changed")] public event EventHandle...

Global event handler for all controls for User Help

HI, I'm extending a windows application written in C# to provide help to the user (in the context of the focused control) when they hit the F1 key. What I’d like to do is make use of the Control.HelpRequested event but I’m not sure how to extend all the controls to handle this event. http://msdn.microsoft.com/en-us/library/system.window...

On Change event for dynamically created Drop dow list VB.NET

Hi, I have a website where the user requires to add and remove Headlines from the main page. The headlines are stored in a database with a column titled 'Display' (true or false) which decides if the headlines appear. I want the user to have the ability to add or remove headlines from the main page, so have created another page which cre...

In what cases are detaching from events necessary?

I'm not sure if I'm entirely clear on the implications of attaching to events in objects. This is my current understanding, correct or elaborate: 1. Attaching to local class events do not need to be detached Examples: this.Closing += new System.ComponentModel.CancelEventHandler(MainWindow_Closing); public event EventHandler OnMyCust...

Flex AS3 - Dispatch Event to all instances of ItemRenderer

Hi I have a List that uses a custom ItemRenderer. Is there a way for the owner (List) to dispatch a custom event I have created, to all instances of it's ItemRenderer? For example, I want to dispatch an event that will add text to a textbox within the item renderer. One or more item renderers will be able to respond to this event depen...

Javascript: Dynamically created html elements referencing an instantiated object

(For further background, this relates to the same piece of work as a previous question) I'm creating a JavaScript based webchat system using jQuery to make life much easier. All the webchat JavaScript code is in an external js file, which is then referenced and instantiated by the html page. <html xmlns="http://www.w3.org/1999/xhtml"&g...

Raise Base Class Events in Derived Classes C#

I have a base class DockedToolWindow : Form, and many classes that derive from DockedToolWindow. I have a container class that holds and assigns events to DockedToolWindow objects, however I want to invoke the events from the child class. I actually have a question about how to implement what this MSDN site is telling me to do. This sec...

How to Raise Event from ActiveX control

Hi, I am new in c#. I am working on image processing. I am creating a UserControl (ActiveX) which is adding just a panel on it. When i use this user control in my another application then how i get the different events. Suppose i want all mouseEvents occurred in my userContol then how i get in my application that mouse event occurre...

Flex3: Custom Item Renderer does not listen to events dispatched by parent

I have a List with a custom ItemRenderer. The ItemRenderer contains a Checkbox and a Label. The component with the List has a 'select all' checkbox. When the 'select all' checkbox is checked, it dispatches an event that each item should listen to in order to select its own checkbox. The eventlistener is added on creationComplete of each ...

VB.net Raising Events ...confusion! MVC

I'm new to MVC and Business Objects but I'm struggling to understand how to trigger a refresh on a form when an update occurs in my business logic. This isn't an issue for 95% of my forms because they call the update from the form that needs to be updated. However, In some cases an inner form does and update that requires an outer form...

Can the parent window be notified when a child window closes? (on a diff domain)

Can the parent window be notified when a child window closes? (on a different domain?) Trying to get around the window.opener not working when on different domains. Can I at least be notified somehow when the child window closes? ...

Subscribe to Vista Events in .NET (e.g. Window Opened)

Hi, I am trying to build my own little toolbox for Vista. One of the features is a "window placeing tool" which places the windows at saved position. Another tool I could imagine are extensions to firefox or thunderbird... For these tools to work, I need them to be able to capture "Events" in Vista. To give you a concrete example: Ex...

Event Invocators in C#

When I implement an event in Visual Studio, Resharper is kind enough to offer to create an event invocator for me. I usually did this by hand in the past, and my invocators always looked like this private void InvokePropertyChanged(PropertyChangedEventArgs e) { if (PropertyChanged != null) { PropertyC...

Events on animations in expression blend 2 silverlight

Hi, I have just created a simple animation. Lets say that in one frame I have an image of the world. I would like to create an event when a certain country is chosen. How can I allow for the event to be triggered by clicking on one particular country in an image? e.g. just displaying the name of the country, etc Thank you Extra info: ...

Using Youtube's javascript API with jQuery

I'm currently trying to use the YouTube API as part of a jQuery plugin and I've run into a bit of a problem. The way the YT api works is that you load the flash player and, when it's ready it will send a call back to a global function called onYouTubePlayerReady(playerId). You can then use that id combined with getElementById(playerId) ...

C# Events and Thread Safety

I frequently hear/read the following advice: Always make a copy of an event before you check it for null and fire it. This will eliminate a potential problem with threading where the event becomes null at the location right between where you check for null and where you fire the event: // Copy the event delegate before checking/calling...