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

Where are the target and action variables?


  • Subject: Where are the target and action variables?
  • From: "Frank Bettger" <email@hidden>
  • Date: Thu, 30 Aug 2007 20:45:36 +0200

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?.

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.
I thought I would find it in NSCotrol since I found there the following four
methods:
- (id)target;
- (void)setTarget:(id)anObject;
- (SEL)action;
- (void)setAction:(SEL)aSelector;
But where are the instance variables target and action?

Thanks Frank
_______________________________________________

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: "Shawn Erickson" <email@hidden>
    • Re: Where are the target and action variables?
      • From: "Emanuele \"∞\" Vulcano" <email@hidden>
  • Prev by Date: byte swapping large chunks of data
  • Next by Date: Re: Where are the target and action variables?
  • Previous by thread: Re: byte swapping large chunks of data
  • Next by thread: Re: Where are the target and action variables?
  • Index(es):
    • Date
    • Thread