• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: simple AppKit / multithreading question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >simple AppKit / multithreading question (From: Aurélien Hugelé <email@hidden>)
 >Re: simple AppKit / multithreading question (From: James Housley <email@hidden>)

  • Prev by Date: Re: Could not connect the action to target of class
  • Next by Date: saving a NSImage/NSImageView to file
  • Previous by thread: Re: simple AppKit / multithreading question
  • Next by thread: Re: simple AppKit / multithreading question
  • Index(es):
    • Date
    • Thread