Re: Subclassing NSControl
Re: Subclassing NSControl
- Subject: Re: Subclassing NSControl
- From: Pierre-Loïc Raynaud <email@hidden>
- Date: Mon, 14 Apr 2003 11:45:55 +0200
On mardi, jan 21, 2003, at 23:25 Europe/Paris, Mark Levin
<email@hidden> wrote:
I have placed an instance of a subclass of NSControl in a window in IB
(using a custom view with the custom class selected), and connected the
target and action, which appears to work normally and doesn't throw any
nib errors when loaded. However, when the control attempts to send this
action, it's disappeared ([self action] returns nil). What am I doing
wrong?
--Mark
If you wrote a NSControl subclass without using cells, and you want to
use target/actions, you just have to link your Control with a
NSActionCell by adding in your NSControl subclass implementation:
+ (Class) cellClass
{
return [NSActionCell class];
}
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.