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

Re: NSMenu itemAtIndex: problem


  • Subject: Re: NSMenu itemAtIndex: problem
  • From: "Tony" <email@hidden>
  • Date: Mon, 11 Nov 2002 00:49:01 -0500 (EST)

you were right.
That function does raise an exception.
Guess i was using the wrong function.
Thanks.


--- On Sun 11/10, Andreas Mayer wrote:
From: Andreas Mayer [mailto: email@hidden]
To: email@hidden
Date: Mon, 11 Nov 2002 05:55:23 +0100
Subject: Re: NSMenu itemAtIndex: problem

> Am Montag, 11.11.02 um 05:22 Uhr schrieb Tony:
>
> > What exactly does NSMenu's itemAtIndex: return when there is no item
>
> > at that index?
>
> I thought it would raise an exception. At least that's what the
> documentation says:
>
> ----
> itemAtIndex:
>
> - (id )itemAtIndex:(int)index
>
> Returns the menu item at location index of the receiver. It raises an
> exception if index is out of bounds.
> ----
>
> > while ([myMenu itemAtIndex: 0])
> > {
> > [myMenu removeItemAtIndex: 0];
> > }
>
> Why not
>
> while ([myMenu numberOfItems])
>
>
> bye. Andreas.
> _______________________________________________
> 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.
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.

  • Prev by Date: Re: create folders
  • Next by Date: Having troubles implementing categories
  • Previous by thread: Re: NSMenu itemAtIndex: problem
  • Next by thread: [ANN] TimeDisc - clock app with source
  • Index(es):
    • Date
    • Thread