• 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: Alexander Spohr <email@hidden>
  • Date: Mon, 27 Sep 2010 11:54:04 +0200

init methods are instance methods.
You are trying to call a class method. there are no init methods in classes.

	atze

Am 27.09.2010 um 02:51 schrieb Jerry Krinock:

> 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 :(
>
> Another thing I tried was to replace the method +[NSCFArray initWithObjects:count:] using Method Replacement.  But it was never invoked, probably for the same reason, although interestingly -[NSCFArray objectAtIndex:] is invoked with great frequency.

_______________________________________________

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: Re: -[NSCFArray initWithObjects:count:]: nil object. Why no crash?
  • Next by Date: Re: NSTimer memory management
  • 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