dispatcher

Dispatcher.BeginInvoke lambda capture thread-safe?

In Windows Phone 7 / Silverlight, is the following code safe or is it a race condition? //Snippet 1 foreach(var item in list) { Deployment.Current.Dispatcher.BeginInvoke( () => { foo(item); }); } Surely (?) this alternative is racy? //Snippet 2 Deployment.Current.Dispatcher.BeginInvoke( () => { foreach(var item in li...

Correct approach to modifying GUI elements from a worker thread with the Dispatcher?

I've got a bit of an issue here where I want to modify GUI elements from various worker threads. Until today, the method I was using worked, but it was most likely very incorrect. The simplest case involves my plugin's GUI, which does something in a worker thread, and when that method completes its work, it calls my callback. That cal...

EventDispatcher undefined in Flex 4 class

Hi all, My class in ActionScript works perfectly, it all it's job but my only concern is that I have a textfield binded to a getter property and although this initially works perfectly, whenever the property updates the value will not change on the textfield =( public function get XMLCollisions():String { var s:String = new String();...

call to undefined method Request::getParam ???

Fatal error: Call to undefined method Request::getParam() in C:\wamp\www\Admin\corporate\for-upload\activecollab\application\modules\system\controllers\CompaniesController.class.php on line 219 in controller class I've written $this->request->getParam('is_owner'); and in request i've passed $router->map('people_companies_add_owne...

WPF Dispatcher.PushFrame vs WinForms Application.DoEvents?

In WinForms, Application.DoEvents method has been regarded as evil by some people. Can anybody tell if its counterpart of Dispatcher.PushFrame in WPF is safe to use? ...

C# Problem setting Label Content in WPF App From Separate Thread

I have a window that contains a label (player1). I also have a class that gathers data asynchronously in the background inside a thread. When that data has been gathered, I want to changed the content of my label. Since the label was created by the UI and I'm trying to edit it from another thread, I tried using Dispatcher. However, after...