Re: Handling mouse click event on a NSButton
Re: Handling mouse click event on a NSButton
- Subject: Re: Handling mouse click event on a NSButton
- From: "I. Savant" <email@hidden>
- Date: Sun, 2 Mar 2008 19:40:33 -0500
I have a NSButton and I would like to have some code executed when the
button is clicked. Special circunstances for this is that my button is
created purely in code, there are no nib files on the project and also
no use of the Interface Builder, and nor can it be, because I'm
developing a cross-platform library. I haven't found how to do that in
those special circunstances.
This is covered in the introductory Cocoa material. See:
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/chapter_6_section_5.html
The target/action mechanism works the same in code as it does in
IB. It's just that in code, you have to explicitly set the target/
action.
--
I.S.
_______________________________________________
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