Re: setting NSSlider floatvalue from different thread
Re: setting NSSlider floatvalue from different thread
- Subject: Re: setting NSSlider floatvalue from different thread
- From: j o a r <email@hidden>
- Date: Tue, 14 Feb 2006 22:03:21 +0100
On 14 feb 2006, at 21.35, Karim Morsy wrote:
I have read in various documents that one should not manipulate any
GUI elements on a thread other than the main thread.
In the general case that's 100% correct.
So can anyone suggest a way how to properly accomplish what I want
to do ? any help would be really appreciated.
It depends on what the button is doing when you keep the mouse button
pressed. If it's blocking the main thread completely, I don't think
that there's much you can do. If, on the other hand, you're just not
in the default run loop mode, you should be able to get it working by
using this method instead of the regular performSelectorOnMainThread
method:
performSelectorOnMainThread:withObject:waitUntilDone:modes:
Make sure to also pass in the NSEventTrackingRunLoopMode (Or whatever
mode is in effect!) with the modes parameter.
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden