• 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: NSEnumerator doesn't support NSCopying - why?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSEnumerator doesn't support NSCopying - why?


  • Subject: Re: NSEnumerator doesn't support NSCopying - why?
  • From: "Tregaskis, Wade" <email@hidden>
  • Date: Wed, 18 Feb 2004 08:32:51 +1100

>You could try the following, if the order of working on the elements is
>not important:
>
>outerEnumerator = [objects objectEnumerator];
>while (a = [outerEnumerator nextObject]) {
> innerEnumerator = [objects reverseObjectEnumerator];
> while (b = [innerEnumerator nextObject]) {
> // do stuff here
> if (a == b) {
> break;
> }
> }
>}

That's an excellent solution - thanks!

Wade Tregaskis
_______________________________________________
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: Odd NSMenu related error
  • Next by Date: Re: Used Size of Text View
  • Previous by thread: Re: NSEnumerator doesn't support NSCopying - why?
  • Next by thread: Redrawing NSTableHeaderCells when on window activation or deactivation
  • Index(es):
    • Date
    • Thread