Where are the target and action variables?
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