Re: Sent Actions, Delegates, Outlets
Re: Sent Actions, Delegates, Outlets
- Subject: Re: Sent Actions, Delegates, Outlets
- From: Graham Cox <email@hidden>
- Date: Thu, 24 Jul 2008 16:15:53 +1000
On 24 Jul 2008, at 3:58 pm, Oleg Krupnov wrote:
Currently the "Sent Actions" section does not even appear in my custom
view's connections menu at all, how would I make it appear?
To clarify: the reason it's not listed is because the built-in support
is for NSControl and its subclasses. If you are just subclassing a
plain NSView, there is no built-in support for target/action, though
it's quite straightforward to implement from scratch - just add a
setTarget: and setAction: method in your view, save the parameters in
ivars and then use [NSApp sendAction:to:from:] to invoke it.
I suspect that this might be a blind alley though - what are you
trying to actually do? Likely that NSNotificaiton could be more
suitable.
Graham
_______________________________________________
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