Re: (no subject)
Re: (no subject)
- Subject: Re: (no subject)
- From: Nick Zitzmann <email@hidden>
- Date: Mon, 16 Jun 2008 19:31:46 -0600
On Jun 16, 2008, at 7:27 PM, Angelo Chen wrote:
I have following action, two NSButtons are linked to it, I'd like to
test which button trigger the action in the code, any way to do
this? thanks.
- (IBAction)doCopying:(id)sender
{
// how to determine which NSButton is clicked?
}
if (sender == someButtonOutlet)
{
// The button with the outlet connection "someButtonOutlet" was
pressed.
}
else if (sender == someOtherButtonOutlet)
{
// The button with the outlet connection "someOtherButtonOutlet" was
pressed.
}
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
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
References: | |
| >(no subject) (From: Angelo Chen <email@hidden>) |