binding NSMenuItem's "enabled"
binding NSMenuItem's "enabled"
- Subject: binding NSMenuItem's "enabled"
- From: "Mark A. Stratman" <email@hidden>
- Date: Wed, 26 May 2004 23:30:55 -0500
I'm trying to disable/enable a menu item based on a boolean NSString
value of a controller's variable.
In the interface's instances pane I have an NSObject subclass called
AppController, and an NSObjectController called AppControllerAlias
whose "content" is AppController.
I have a menu item with "enabled" bound to AppControllerAlias, using
"selection" and the key path of "loggedin".
In the AppController source i have the methods: "setLoggedin:(NSNumber
*)" and "(NSNumber *)loggedin".
I'm using "[self setValue:[NSNumber numberWithBool:NO]
forKey:@"loggedin"]" within AppController to try to disable the menu
item.... but it's not working.
The menu item is always enabled.
Anybody have any ideas, or pointers?
Thanks,
- Mark A. Stratman
_______________________________________________
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.