I have an object which is running on an STA thread.
Sub MyAsyncTask()
Do
MyWorker = New JobWorker()
MyWorker.Work()
Loop
End Sub
Protected InnerThread As New Thread(AddressOf Me.MyAsyncTask)
Public Sub Start()
Started = Now
InnerThread.SetApartmentState(ApartmentState.STA)
Inn...
Hi everybody,
im just starting with TDD and could solve most of the problems i've faced on my own. But now im lost: How can I check if events are fired? I was looking for something like Assert.Raise or Assert.Fire but theres nothing. Google was not very useful, most of the hits were suggestions like foo.myEvent += new EventHandler(bar);...
What's the difference between an event handler and an event listener?
Up until recently I considered them to be different names for the same thing: a function that's called when an event occurs. But I read something recently that referred to the event handler as the DOM element to which the event listener was bound, which would make se...
Hi,
I'm trying to render a Button on a GeometryModel3D by using a VisualBrush. Is there a way I can handle the button's click event directly? (or is it that the VisualBrush only renders the image of a button and I am supposed to use the VisualTree in order to check if the button was pressed? )
Thanks!
...
I am building a compartmentalized Flex application which uses <SWFLoader > to load additional Flex applications inside it. I am currently planning on using the LocalConnection class to have these two applications talk to each other, but I'm wondering if there's any kind of event driven way to have actions in the internal application pro...
I'm not sure why this is bubbling, but it is. Wondering if anyone has any ideas?
$('#file_upload').live('submit',function(event){
$('#file_upload').attr('action','io.cfm?action=updateitemfile&item_id='+$('.agenda-modal').attr('data-defaultitemid'));
$('iframe').load(function(){
$('.upload_output').empty();
...
I have various html links on a page that I want to drag into another page/window using the ondrop event. While I expect to modify the objects being created on the new page, the example below is likely good enough to show what I am after.
How do I prevent firefox from simply loading the URL I am dropping in the page?
I was hoping to us...
I have 2 textBoxes. First is visible the second is not.
When keyDown event fires on first textBox I want to fire the same event on 2nd textBox, so it would react same as if user was typing in 2nd textBox.
How can I do that?
EDIT:
I know you can do this in Windows.Forums and I was hoping that it can be done here too.
My goal is to ha...
Hello Community!
I'm stuck with an issue and I cannot understand why it behaves like that...
In a for loop, I'm passing the for index as an event parameter. However, the eventHandler is getting the wrong index, but the right target...
Here's some code.
.as class method:
public function set dataProvider(a:Array):void
{
var x:int =...
I updates a div content with some html via an ajax call, and I what to execute a function after all the images from the ajax response are loaded.
See the code below, #gridWrapper is coming from the Ajax response and it has a lot of thumbnail images.
success: function(Data){
MyGrid.prepGridLayout(Data.html);
$('#gridWrapper .thumbnai...
I'm using System.Speech.Recognition in Windows 7 to let the user control a program by voice commands. The recognition code is integrated into the program itself. Now, the recognition engine is created at program startup and recreated if the user changes the voice recognition language. This all works fine.
Recently we had an issue with t...
I have a abstact class named Organism which has a Born event. Also I have some classes that inherit the Organism class... So my question is how can I raise the Born event among all instances of all classes, which inherited the Organism class?
EDIT: Sorry, The event I meant to write was Tick not Born... Born is a instance level event...
...
I have a timed event I want to behave differently accordingly to what HTML element the mouse pointer is on.
Is there a way, assuming I have the HTML element, to know if the mouse pointer is currently on top of it.
I am well aware of the onmouseover/onmouseout events and how to use them.
I am using JQuery.
I am obviously looking for some ...
is there a mouse off (or cursor off) event in wxpython as I need to bind such an event to a panel, making it can automatically store the values input by the user when he is done and click on the other panel. Or is there any other alternative way to make it look nicer without creating uncessary buttons then to bind events to these buttons...
I have a multithreaded application that spawns threads for several hardware instruments. Each thread is basically an infinite loop (for the lifetime of the application) that polls the hardware for new data, and activates an event (which passes the data) each time it collects something new. There is a single listener class that consolidat...
hey guys,
weird question. I'm trying to extend a little plugin that's in my blog's sidebar. The plugin comes with a bit of Ajax. It contains a form and when it's submitted it loads a div#error_msg or a div#success_msg (all through ajax).
Is there a way for me to find out when one of this divs appear? Just so get what i want: I want to p...
So yes I'm very new to creating my own custom events. I can do the basics when I put controls on a form but this one is a little more complex. I have an application that reads in a .TSV and populates a form with controls based on the number of objects it "reads." So for instance: I have a file that contains 10 people objects and my code ...
I have a frequency and a time range with which the frequency has to be executed.
For eg, if the current time is 2AM and frequency is 360 mins, it has to assume that
since it just passed midnight , the task should execute at 360 mins after 12 means 6 AM
the current time is server start time from midnight.
so if server starts at 5AM and ...
How do I get a timer event to fire one at a time.
For example I have a timer that raises an event every 10 minutes.
The event that is raised takes 10 or more minutes to finish executing.
I would like the timer to reset AFTER the event has finished.
In other words I do not want to raise more than 1 instance of the event at any one time.
...
I have a number of threads which wait on an event, perform some action, then wait on the event again. Another thread will trigger the event when it's appropriate.
I can't figure out a way to ensure that each waiting thread triggers exactly once upon the event being set. I currently have the triggering thread set it, sleep for a bit, the...