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 protected])
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]