I'm writing a J2ME application. One of the pieces is something that polls the contents of a directory periodically, and, if there are any new things, paints them on the screen. I've done this by having the UI form launch a polling thread with a pointer back to itself, and when the polling thread finds something it calls back to the for...
Hi,
I currently trying to write a component where some parts of it should run on the UI thread (explanation would be to long).
So the easiest way would be to pass a control to it, and use InvokeRequired/Invoke on it.
But I don't think that it is a good design to pass a control reference to a "data/background"-component, so I'm searching...
I would like to create a new event-dispatch thread in Swing, and I'm having trouble finding any references online for how to do this. I have done this in .NET by creating a new thread and calling Application.run(...). Has anyone done this? Is it possible in Swing?
FYI the reason I am trying to do this is because I am writing an Eclip...
Here is the problem I have: I need to make sure an object is instantiated on the UI thread. If it is not, it should throw an exception. But how do I check inside a method whether it is running on the UI thread? Note: I do not want to pass any information into the object's constructor.
The perfect candidate would be the DispatcherSynchro...
For the sake of argument, consider a UI thread as a thread that has had a call to Application.Run() or one of it's overloads called on it and has an active message loop running.
Is there a way of detecting if we're currently executing on such a thread?
The reason I want this is because I have a class with a private function that is lon...
I'm using Watin for browser testing, which has to run on the UI thread.
I want to schedule a job using Quartz.NET but can't work out a way to run it on the UI thread (using a WPF application)
Any ideas?
...
I want to use a BackgroundWorker or a Thread to call a method from my windows form on a class located in my business layer. I would like the method in this business layer to be able to report its progress if anyone is listening as it may take awhile to complete.
Since I may start with a BackgroundWorker and later decide to use a regular ...
I have a method that is asynchronously called when System.Net.Sockets.NetworkStream.BeginRead completes.
skDelegate = New AsyncCallback(AddressOf skDataReceived)
skStream.BeginRead(skBuffer, 0, 100000, skDelegate, New Object)
In that callback method, I need to interact with the UI thread.
Sub skDataReceived(ByVal result As IAsyncRe...
I'm working on Java Swing application with Google Guice as an IOC container. Things are working pretty well. There are some UI problems. When a standard L&F is replaced with Pushing pixels Substance L&F application is not running due to Guice's Swing components creation outside of UI thread.
Is there a way to tell Guice to create Swing ...
I have two AsyncTask Activities, whose sole responsibilties are to execute an AsyncTask on the UI Thread. One of them works great, displays the progressBar, and updates the ProgressBar message. This is for my SearchActivity, which is actually a search activity with the Google Search metadata for declaring a search activity. I created a c...
The only AsyncTask that I have that is working properly is one that handles a progressdialog for a search. None of my other AsyncTasks are getting to onPostExecute() even though the doInBackground() is completing! I am pulling my hair out because it used to work in earlier commits and doing a compare, I see no difference! A lot of the As...
I have a ProgressBarWindow which has a progressbar and a cancel button on it which I use to report progress on file I/O. However, the UI Thread of the ProgressBarWindow and my main window both hang despite all the work being done in a backgroundworker. The progressbar is rendered, as is my main window, but does not update whilst the back...
Hi All
I have a real-time application which constantly updates a UI log (RichTextBox control) in the form of a ListView control. The control is updated with current application data received via events. My application was running very slow and i found it was due to the ListView log being updated, which blocks the UI thread. As you can i...
How do I ensure code is or is not executed on the UI thread in an Android MapActivity project?
I am developing an Android map-based application, but I have experienced some stability issues and my research has led me to believe I need to ensure that screen updates are carried out on the UI thread.
My app has data coming in from a GPS l...
I've got an TabActivity implementing TabContentFactory, which starts an AsyncTask in onCreate() to fetch the data for the tabs. When the AsyncTask has finished, onPostExecute() could directly update the UI-elements, right? Meaning, since that method runs in the UI-Thread no further thread-synchronization would be required when accessing ...