Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Where are the target and action variables?



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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.