• 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: Question on cocoa style: value for (id)sender parameter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question on cocoa style: value for (id)sender parameter


  • Subject: Re: Question on cocoa style: value for (id)sender parameter
  • From: Larry Fransson <email@hidden>
  • Date: Mon, 24 Jan 2005 13:10:05 -0800


On Jan 24, 2005, at 12:24, Matt Gillette wrote:

[aSheet orderOut:NULL]; [aSheet orderOut:self];

Is there any advantage to null/nil versus self? What is the sender variable used for?

There may be occasions, particularly in IBAction methods that you write, where the action taken might depend on what is triggering the action. The sender parameter allows you to figure out what is triggering the action so that you can decide what to do.


Larry Fransson
Seattle, WA

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Question on cocoa style: value for (id)sender parameter
      • From: Evan Schoenberg <email@hidden>
References: 
 >Question on cocoa style: value for (id)sender parameter (From: Matt Gillette <email@hidden>)

  • Prev by Date: Re: Question on cocoa style: value for (id)sender parameter
  • Next by Date: iSync-like toolbar and scrolling
  • Previous by thread: Re: Question on cocoa style: value for (id)sender parameter
  • Next by thread: Re: Question on cocoa style: value for (id)sender parameter
  • Index(es):
    • Date
    • Thread