• 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: fetching from NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fetching from NSArray


  • Subject: Re: fetching from NSArray
  • From: Jim Puls <email@hidden>
  • Date: Tue, 2 Oct 2007 16:11:31 -0700

On Oct 2, 2007, at 4:04 PM, Andy Lee wrote:

On Oct 2, 2007, at 5:23 PM, Erfan Aleemullah wrote:
[m_storage getObjects:aBuffer range:Range];

Bizarre -- the docs for -getObjects:, -getObjects:range:, and +arrayWithObjects:count: give no clue that I can find about what the aBuffer argument is supposed to be. I'm trying to imagine why on earth it would be an id*.

They do exactly what the docs say they do — copy the pointers from the NSArray to a buffer. So the buffer should be a pointer to a pointer, that is, an id*. The program is crashing because you haven't allocated any memory for the buffer.


I suppose the standard question applies of "what do you really want to do?" The set of situations where any of the buffer-related methods in the Foundation collections are genuinely useful is pretty small.

-> jp_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >fetching from NSArray (From: "Erfan Aleemullah" <email@hidden>)
 >Re: fetching from NSArray (From: Andy Lee <email@hidden>)

  • Prev by Date: Re: fetching from NSArray
  • Next by Date: Re: fetching from NSArray
  • Previous by thread: Re: fetching from NSArray
  • Next by thread: Re: fetching from NSArray
  • Index(es):
    • Date
    • Thread