• 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: NSQueue equivalent?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSQueue equivalent?


  • Subject: Re: NSQueue equivalent?
  • From: Charles Srstka <email@hidden>
  • Date: Tue, 19 Feb 2002 19:04:23 -0600

Use NSMutableArray.

[someArray addObject:someObject] to put something on the end of the queue, [someArray objectAtIndex:0] to get the object on the front of the queue, [someArray removeObjectAtIndex:0] to remove the object at the front of the queue.

There's a long debate about this on the Omni Group list from a while ago. If you search their archives, you can find it.

On Tuesday, February 19, 2002, at 12:33 PM, Steve Mykytyn wrote:

It would be helpful to have a class like "NSQueue" that allowed one to put in objects and take them out FIFO or LIFO. A search of the documentation didn't reveal any obvious ways to accomplish this. Any suggestions? Won't be that hard to write one, but would rather not reinvent the wheel...
_______________________________________________
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.
_______________________________________________
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.

References: 
 >NSQueue equivalent? (From: Steve Mykytyn <email@hidden>)

  • Prev by Date: Re: NSQueue equivalent?
  • Next by Date: Compiler skipping code
  • Previous by thread: Re: NSQueue equivalent?
  • Next by thread: Re: NSQueue equivalent?
  • Index(es):
    • Date
    • Thread