RE: performSelectorOnMainThread primitives for withObject
RE: performSelectorOnMainThread primitives for withObject
- Subject: RE: performSelectorOnMainThread primitives for withObject
- From: Kirk Kerekes <email@hidden>
- Date: Wed, 22 Apr 2009 11:49:33 -0500
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: (id) value
{
[self setValue: value forKey: @"activated"];
}
OR, in your thread:
[view performSelectorOnMainThread:
@selector(setValuesForKeysWithDictionary:) withObject: [NSDictionary
dictionaryWithObjectsAndKeys: [NSNumber numberWithBool:YES],
@"activated",nil] waitUntilDone: YES];
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 like it works that way.
Do I really have to use NSInvocation for this?
cheers
--
Torsten
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden