events

Using templated custom wxEvent with wxEvtHandler::Bind

In the following code I do the following: I create a new template wxCommandEvent class that holds some payload specified by the template. I then subclass a wxStringPayloadEvent class. Finally I create an example app that simply issues a wxStringPayloadEvent and then the event handler gets triggered and displays the payload in a message...

Getting notified when the network connection changes in a Cocoa / Obj-C application

Is there any way to be notified / have your Cocoa application listen for changes in the network connection (disconnect, connect, etc.)? How does something like HardwareGrowler do it? ...

Performing a DeepCopy(clone) when Events are Attached

When you have an object that provides events and you use a deepclone (serialisation) approach to cloning the object, how do you do it when there are events on the object that are actually attached. If my object declares an event, but nothing is attached then object can be cloned without issue. BUT if the object has had events attached,...

Is it poor form for a C# class to subscribe to its own published events?

I'm probably just being neurotic, but I regularly find myself in situations in which I have class that publishes an event, and I find it convenient to subscribe to this event from within the class itself (e.g. in the constructor), rather than only subscribing from external classes. This sounds reasonable to me, but I can't help the nagg...

Main form's OnLoad override never gets called

Hi, The following problem has me stumped: I have a WinForms application which used to work just fine. On Windows7 however, my MainForm's "Load"-event handler is never invoked. I tried Googleing a bit and found suggestions for checking if the Event was correctly connected to the handler (it was), and secondly to try overriding the OnLoad...

Why my webview detects events along with phone number

Hi friends Why my webview detects events along with phone number? my code is webview.dataDetectorTypes= UIDataDetectorTypePhoneNumber. Is it can disable the events alone. Regards, sathish ...

[iOS] How to preserve touch event after new view is added by long press

Hello, When I add a new view after detecting user's long press, I get touchesCancelled event. However, I want to preserve the long press event to newly added view. What I want to implement is user touch & hold the screen, then new view added, and user can move touch around in the newly added view without touch up and touch down again. ...

Is it possible to declare a generic event in vb.NET?

I have tried to write: Event EventName(Of T)() But Visual Studio tells me that "Type parameters cannot be specified on this declaration." Is such a declaration possible or will I have to put T as a regular argument? ...

How to use event bubbling in Flex

Hi Actually I wanted to know what is bubbling event and how to make use of it. Also, what is the concept of capturing, targeting and bubbling too? If any one knows or could give any sample piece of code for explanation that would be helpful. ...

Java events vs C# - new to Java

I am new to the world of Java. I'm coming from C#. I'm trying to set up a custom event. Here is how I would have done this in C# class A { public EventHandler Changed; public void FunctionA() { if(Change != null) Changed(this, null); //fire the event! } } class B { private A instanceOfA = new A(); ...

How to get cell value change when closing form?

Hi, I have a form with a DataGridView on it. In this DataGridView there is a DataGridViewComboBoxColumn. When changing the value of a cell of this DataGridViewComboBoxColumn, the CellValueChanged-event is only fired when leaving the cell (for example, if I click into another cell). The event is not fired when I change the value and the...

How can I get notified that binding has finished?

I have an application to which I want to add a progress bar. It works in most cases. In one case the time is actually taken because of binding and layout work which is asynchronous, so my progress bar is hidden before the work is actually done. Its rather large list of items shown within a scroll view. I can't use virtualizing becaus...

Sink JSF 2.0 Composite Component Event in Parent Page Backing Bean

Hi All, I have a conceptual mind-block around the use of a JSF 2.0 composite component within a parent page. I understand how to implement an ActionListener (and others) for a composite component's action but how is this wired-up for the parental page to consume? For example, I want my login composite component to perform authentication...

wxWidgets 2.9 custom events

I appear to have followed this example (found under "Defining Your Own Event Class"), and my code compiles and runs without error, but I'm not catching the event anywhere. The code: class MyCustomEvent : public wxEvent { //... stuff here }; wxDEFINE_EVENT(MY_CUSTOM_EVENT_1,MyCustomEvent); and later I bind the event: Bind(MY_CUSTOM_E...

How to set an event for "Enter" pressed while cursor is inside a textbox within usercontrol.

Hi, I have a usercontrol which is used for searching. There is a textbox and a search button. When the button is clicked the search method is called. I want the search also to occur when the cursor is inside the textbox and the enter key is pressed. My first thought on how to do this was maybe to add the event to submit action of the fo...

Highly scalable db schema for recurring events

Which is the best way to design a db schema in which store hundreds of thousand events, with recurrencies, and that will support milions of query asking which events will occur in a range of dates? I mean, designing the tables to describe the model should be not difficult, but doing that in such a way that the huge amount of data can be...

How to Attach the Events of an Original Object to a Deep Copied Clone

Following up on my question yesterday to deepcopy an object with events in C# and attach the events of the original object to the Cloned copy is pretty easy, you just set the Event declaration in the Copy = the value in the original. Deep Clone when events are attached How do you do this in VB.Net? (Using .Net 2) I was hoping maybe the...

How to know when an Android ListView is done being populated

I have a child Activity that contains a ListView. This Activity is populated asynchronously from a SQLite cursor. The list items contain a TextView, a RadioButton, and a normal Button. The XML is shown below: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:id="@+id/rlCategoryListItemLayout" xmlns:android="http://schemas.a...

ASP.NET Button Click Event Won't Fire After User Downloads File

Hello. I've got a page that has a button control and several links to download files. The links for the file downloads point to a generic handler, since these files are secured and they will only be returned if the user is logged in. If I load the page and click the button without doing anything else it works fine, and the event fires. ...

How do you raise an event in C#?

An stock data download class has a BarList to which it either adds new bars or updates and replaces the last bar when the last bar changes realtime. Whenever this download class adds a new bar to the BarList class or changes its last bar, it also calls its NotifyOnBarsAdded or NotifyOnBarChanges. I'm trying to get the notify methods to r...