Re: Need some more understanding about NSDrawer
Re: Need some more understanding about NSDrawer
- Subject: Re: Need some more understanding about NSDrawer
- From: Bill Bumgarner <email@hidden>
- Date: Mon, 25 Dec 2006 09:50:04 -0800
On Dec 25, 2006, at 12:58 AM, Craig Laird wrote:
- (void)toggleDrawer:(id)sender {
NSDrawerState state = [drawer state];
if (NSDrawerOpeningState == state || NSDrawerOpenState == state) {
[drawer close];
} else {
[drawer openOnEdge:NSMinXEdge];
}
}
Seems like an awful lot of effort.
- (void) toggleDrawer:(id)sender {
[drawer toggle: sender];
}
Or, better yet, you could just hook the toolbar button directly to
the drawer and do away with the above code altogether.
There is absolutely nothing magic about "Interface Builder Buttons";
nothing that can't be directly translated to code. It can seem like
there is magic, but there really isn't!
b.bum
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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