Re: fetching from NSArray
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