• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: (no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: (no subject)
      • From: Graham Cox <email@hidden>
References: 
 >(no subject) (From: Angelo Chen <email@hidden>)

  • Prev by Date: Re: Custom field editor on NSSecureTextField?
  • Next by Date: Re: (no subject)
  • Previous by thread: (no subject)
  • Next by thread: Re: (no subject)
  • Index(es):
    • Date
    • Thread