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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to