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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to