On Thu, Apr 8, 2010 at 2:05 PM, John Nairn <j...@geditcom.com> wrote:
> 1. Why would the initWithObject: compile in the first place? (perhaps
> because one of my custom classes defines an initWithObject: method)

Correct. +alloc is typed to return id, which the compiler won't warn
about if it has ever seen the method you're sending defined on any
class.

> 2. Even if it compiles, how can it run in Snow Leopard when there is no
> initWithObject: selector for NSArray (or at least according to the NSArray
> docmentation there isn't one)?

Have you checked your console output? Or there might be a private
-initWithObject: method and you happened to get lucky.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to