Re: Calling IB Actions In PB
Re: Calling IB Actions In PB
- Subject: Re: Calling IB Actions In PB
- From: Albert Atkinson <email@hidden>
- Date: Sat, 13 Apr 2002 12:42:21 -0500
Hello!
Yes, this is exactly what I was asking. However, how do I let the
app know which drawer to toggle?
Sorry about the dumb questions...I am pretty new.
Thanks!
Albert
On Saturday, April 13, 2002, at 12:39 PM, Andy Lee wrote:
At 12:01 PM -0500 4/13/02, Albert Atkinson wrote:
How do I call common actions in IB using PB? For example I would
like to use the toggleDrawer: action but since I am using a
toolbar I need to hard code it so is there any way I can make
reference to toggleDrawer: ?
If I understand correctly, you are asking how to refer to the
-toggleDrawer: action in Objective-C code as opposed to making the
connection graphically in Interface Builder.
Here's how:
[myToolbarItem setAction:@selector(toggleDrawer:)];
The @selector() directive lets you refer to method names. An
action is just a method. Note that the colons in method names are
significant, so don't make the following easy-to-make typo:
[myToolbarItem setAction:@selector(toggleDrawer)]; // WRONG
--Andy
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.