Re: NSMenuItem - setHidden
Re: NSMenuItem - setHidden
- Subject: Re: NSMenuItem - setHidden
- From: Andy Lee <email@hidden>
- Date: Fri, 22 Aug 2008 14:02:27 -0400
On Aug 22, 2008, at 9:28 AM, Stuart Green wrote:
I've got a menu item in my app's root menu that I want to hide.
I've referenced it as an IBOutlet as per:
IBOutlet id itemToBeHidden;
Any reason you don't declare this as an NSMenuItem? Doing so would
give you a little protection from silly errors like connecting to the
wrong kind of object in IB, or sending a message the object doesn't
respond to.
I'm trying to hide it as per:
[itemToBeHidden setHidden:YES];
I haven't used this method myself, but I see it's Leopard-only. Any
chance you're running on Tiger? Also, are you sure the message is
being sent and that itemToBeHidden is not nil? An NSLog just before
the above line would confirm.
--Andy
_______________________________________________
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