Sending actions with a custom NSControl subclass
Sending actions with a custom NSControl subclass
- Subject: Sending actions with a custom NSControl subclass
- From: Stephen Blinkhorn <email@hidden>
- Date: Thu, 16 Jul 2009 11:42:02 -0600
Hello,
During my recent encounter with custom NSControl and NSCell subclasses
I found this amazing nugget on cocoadev.com.
"..If you write an NSControl subclass without using cells, and you
want to use target/actions, you have to link your Control with a
NSActionCell? by adding in your NSControl subclass implementation"
eg +(Class) cellClass { return [NSActionCell? class]; }
This works perfectly for me but why the question marks? Is there some
uncertainty about whether this is the correct way to go?
Thanks,
Stephen.
_______________________________________________
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