Re: simple AppKit / multithreading question
Re: simple AppKit / multithreading question
- Subject: Re: simple AppKit / multithreading question
- From: "Dennis C. De Mars" <email@hidden>
- Date: Sat, 12 Mar 2005 10:42:12 -0800
On Mar 11, 2005, at 6:50 AM, James Housley wrote:
Aurélien Hugelé wrote:
Hi list !
my app is heavily multithreaded, and needs to modify the GUI. I know
that the interface mods needs to be done in the main thread.
Its is very convenient to use performSelectorInMainThread: for my
secondary threads... but still, i have a question :
most of my threads need to modify the enabled/disabled state or the
hidden/shown state of my widgets. I use setEnabled:YES/NO or
setHidden:YES/NO
but i can not use performSelectorInMainThread:withObject: here! the
argument of this method must be NSObjects ... not BOOL !
[NSNumber nubmerWithBool:<bool value]
That will make a nice object for you.
...and what do you think will happen when
performSelectorInMainThread:withObject delivers this nice object to a
method that is expecting a BOOL, not an object, as its argument?
- Dennis D.
_______________________________________________
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