• 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: Where are the target and action variables?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Where are the target and action variables?


  • Subject: Re: Where are the target and action variables?
  • From: "Shawn Erickson" <email@hidden>
  • Date: Thu, 30 Aug 2007 11:55:42 -0700

On 8/30/07, Frank Bettger <email@hidden> wrote:
> A newbie question. Suppose I have an AppController object with a method
> called seed:. Suppose I have a NSButton object with the target outlet that
> points at AppController object and and action that triggers AppControllers
> seed: method.
> My question is what happens when I Control-drag in the IB from the button to
> my instance of AppController and then choose Target/Action tab in the
> inspector and select seed: and then click on the Connect button.
>
> As I understand it NSButton has two instance variables called target and
> action. As soon as I perform the actions in IB, descrined above the
> following happens:
> 1. The address of the AppController object is stored in the target instance
> variable.
> 2. The selector of the AppController's seed: method is stored in the action
> instance variable.
> Is this correct or wrong?.

Essentially yes, however you shouldn't really worry about how this
information is stored, etc. since it is an implementation detail.

> One more question: Looking at the interface of NSButton and it's
> superclasses NSControl, NSView, NSResponder, NSObject. I did not find any
> instance variables called target and action.

Again it is an implementation detail... don't worry about. :)

(hint: it is stored by the controls cell)

-Shawn
_______________________________________________

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: Where are the target and action variables?
      • From: "Frank Bettger" <email@hidden>
References: 
 >Where are the target and action variables? (From: "Frank Bettger" <email@hidden>)

  • Prev by Date: Re: Different methods for setting the delegate?
  • Next by Date: Re: byte swapping large chunks of data
  • Previous by thread: Re: Where are the target and action variables?
  • Next by thread: Re: Where are the target and action variables?
  • Index(es):
    • Date
    • Thread