Re: performSelectorOnMainThread primitives for withObject

2009-04-22 Thread Torsten Curdt
>> It does not seem like it works that way. > > Is it documented to work that way? No. I wish it would always be that simple with documentation :) But seriously - I could have just missed it. Stuff like that do happens sometimes ;) >> Do I really have to use NSInvocation for this? > > Of course n

RE: performSelectorOnMainThread primitives for withObject

2009-04-22 Thread Kirk Kerekes
You don't have to use NSInvocation -- you could instead define a category on NSView that wrapped setActivated: ( STANDARD COMPOSED IN MAIL WARNING ) - (void) setActivatedWithObjectValue: (id) value { [self setActivated: [value boolValue]]; } OR - (void) setActivatedWithObjectValue: (

Re: performSelectorOnMainThread primitives for withObject

2009-04-22 Thread Keith Duncan
Is this supposed to work or not? - (void) setActivated:(BOOL)theStatus; [view performSelectorOnMainThread:@selector(setActivated:) withObject:[NSNumber numberWithBool:YES] waitUntilDone:YES]; This won't work since the boolean isn't auto-unboxed. Your method should accept an NSNumber wrappi

Re: performSelectorOnMainThread primitives for withObject

2009-04-22 Thread Michael Ash
On Wed, Apr 22, 2009 at 12:13 PM, Torsten Curdt wrote: > Hey folks, > > Is this supposed to work or not? > >  - (void) setActivated:(BOOL)theStatus; > >  [view performSelectorOnMainThread:@selector(setActivated:) > withObject:[NSNumber numberWithBool:YES] waitUntilDone:YES]; > > It does not seem l

Re: performSelectorOnMainThread primitives for withObject

2009-04-22 Thread Ken Thomases
On Apr 22, 2009, at 11:13 AM, Torsten Curdt wrote: Is this supposed to work or not? - (void) setActivated:(BOOL)theStatus; [view performSelectorOnMainThread:@selector(setActivated:) withObject:[NSNumber numberWithBool:YES] waitUntilDone:YES]; It does not seem like it works that way. No, t

Re: performSelectorOnMainThread primitives for withObject

2009-04-22 Thread Volker in Lists
Hi Torsten, do you have more details on what the main thread implements and what you expect it to do, but doesn't do? I am using similar constructs and they work . Volker Am 22.04.2009 um 18:13 schrieb Torsten Curdt: Hey folks, Is this supposed to work or not? - (void) setActivated:(B