• 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
NSMenu itemAtIndex: problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSMenu itemAtIndex: problem


  • Subject: NSMenu itemAtIndex: problem
  • From: "Tony" <email@hidden>
  • Date: Sun, 10 Nov 2002 23:22:46 -0500 (EST)

What exactly does NSMenu's itemAtIndex: return when there is no item at that index?
I have a method to remove all items on a menu that looks like this:

while ([myMenu itemAtIndex: 0])
{
[myMenu removeItemAtIndex: 0];
}

But this results in a infinite loop.
Can someone tell me why?
Thanks.
The most personalized portal on the Web!
_______________________________________________
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.

  • Follow-Ups:
    • Re: NSMenu itemAtIndex: problem
      • From: Andreas Mayer <email@hidden>
    • Re: NSMenu itemAtIndex: problem
      • From: Tony Cate <email@hidden>
  • Prev by Date: create folders
  • Next by Date: Re: create folders
  • Previous by thread: Re: create folders
  • Next by thread: Re: NSMenu itemAtIndex: problem
  • Index(es):
    • Date
    • Thread