• 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: -[NSCFArray initWithObjects:count:]: nil object. Why no crash?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -[NSCFArray initWithObjects:count:]: nil object. Why no crash?


  • Subject: Re: -[NSCFArray initWithObjects:count:]: nil object. Why no crash?
  • From: Ken Thomases <email@hidden>
  • Date: Mon, 27 Sep 2010 10:18:50 -0500

On Sep 26, 2010, at 7:51 PM, Jerry Krinock wrote:

> On 2010 Sep 26, at 16:58, Ken Thomases wrote:
>
>> Have you tried actually using the method that's in his log (-initWithObjects:count:), instead of a different one?  Or even +arrayWithObjects:count:?
>
> Yes, but to make a long story short, I was stymied by the rocket science of class clusters and abstract classes.  The error says that +initWithObjects:count: was sent to NSCFArray.  So first I reverse-engineered from savannah.gnu.org what are the argument types.  They are id* (a C array of ids), and an unsigned int.  Then I constructed an invocation using the NSClassFromString(), @selector(), etc.  But upon invoking, the system told me that +initWithObjects:count: is not implemented the *abstract* class NSCFArray.  I don't know what the concrete subclass is :(

Just invoke it on an NSArray instance: [[NSArray alloc] initWithObjects:foo count:bar]

Regards,
Ken

_______________________________________________

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: 
 >-[NSCFArray initWithObjects:count:]: nil object. Why no crash? (From: Jerry Krinock <email@hidden>)
 >Re: -[NSCFArray initWithObjects:count:]: nil object. Why no crash? (From: Ken Thomases <email@hidden>)
 >Re: -[NSCFArray initWithObjects:count:]: nil object. Why no crash? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: [ANN] A new book by Erik M. Buck
  • Next by Date: Re: -[NSCFArray initWithObjects:count:]: nil object. Why no crash?
  • Previous by thread: Re: -[NSCFArray initWithObjects:count:]: nil object. Why no crash?
  • Next by thread: Re: -[NSCFArray initWithObjects:count:]: nil object. Why no crash?
  • Index(es):
    • Date
    • Thread