• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSMenuItem - setHidden
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >NSMenuItem - setHidden (From: Stuart Green <email@hidden>)

  • Prev by Date: Re: WebFrame stopLoading in delegate crashes app
  • Next by Date: Re: Tabbed preference panels
  • Previous by thread: Re: NSMenuItem - setHidden
  • Next by thread: Re: NSMenuItem - setHidden
  • Index(es):
    • Date
    • Thread