• 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
[solved] Programatically adding/removing menu items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[solved] Programatically adding/removing menu items


  • Subject: [solved] Programatically adding/removing menu items
  • From: Joe Morris <email@hidden>
  • Date: Tue, 2 Jul 2002 06:55:36 -0400

Nicholas Riley wrote:
I think you're working too hard :-)

I think he's right! And thanks again for the amazingly fast reply, BTW.

The code I posted removed the old menu item and inserted a new one. The bug in the code was my

@selector(hideIncapacitated)

It should have had a colon at the end of the function name to indicate a one argument function. That's why it wasn't finding it, which was why it wasn't enabling the new menu item.

But the real way to do this sort of thing is much, much easier - just use the menuItem setTitle method, which I am now doing. :-P Uh duh.

Thanks!

-Joe

"I am thankful for small mercies. I compared notes with one of my
friends who expects everything of the universe, and is disappointed
when anything is less than the best, and I found that I begin at the
other extreme, expecting nothing, and am always full of thanks for
moderate goods."
-- Ralph Waldo Emerson
_______________________________________________
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.

  • Prev by Date: Re: Programatically adding/removing menu items
  • Next by Date: Re: Installing a new login item?
  • Previous by thread: Re: Installing a new login item?
  • Next by thread: Re: Storing generic objects as plists (i.e. plist object persistence)
  • Index(es):
    • Date
    • Thread