On Apr 8, 2010, at 7:35 AM, Patrick M. Rutkowski wrote: > What I was worried about is that maybe NSMutableArray (or any > sub-class in general) would need to do some special sub-class-specific > initialization, which it might not have implemented. I guess though, > if you're going to be sub-classing a class, then you ought to > generally make sure that all of it's static method will work on your > new sub-class? > > There's always the danger that the super-class will have new static > methods added without your knowledge though.
There is no such thing as a static method in Objective-C; there are class methods and instance methods. Class methods are inherited just like instance methods. Thus, when you say [NSMutableArray array], NSMutableArray's implementation of +array will be invoked (if it exists), regardless of whether or not said method is declared in the @interface of NSMutableArray. b.bum _______________________________________________ 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