• 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: [NSMutableArray array]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [NSMutableArray array]


  • Subject: Re: [NSMutableArray array]
  • From: "Patrick M. Rutkowski" <email@hidden>
  • Date: Thu, 8 Apr 2010 13:21:21 -0400

Agreed, but there's always the danger the +array method, which might
actually be implemented in NSArray.m, will not properly initialize the
more specific NSMutableArray object.

Of course, in this specific case that's the case, but it might be the
case with other class hierarchies.

But, nonetheless I'm troubled that nobody in this thread has
acknowledged that yet :-o

-Patrick

On Thu, Apr 8, 2010 at 12:37 PM, Bill Bumgarner <email@hidden> wrote:
>
> 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 (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

  • Follow-Ups:
    • Re: [NSMutableArray array]
      • From: Michael Ash <email@hidden>
    • Re: [NSMutableArray array]
      • From: Bill Bumgarner <email@hidden>
    • Re: [NSMutableArray array]
      • From: Shawn Erickson <email@hidden>
    • Re: [NSMutableArray array]
      • From: Fritz Anderson <email@hidden>
References: 
 >[NSMutableArray array] (From: "Patrick M. Rutkowski" <email@hidden>)
 >Re: [NSMutableArray array] (From: Dave DeLong <email@hidden>)
 >Re: [NSMutableArray array] (From: "Patrick M. Rutkowski" <email@hidden>)
 >Re: [NSMutableArray array] (From: Bill Bumgarner <email@hidden>)

  • Prev by Date: Re: IB Parses Class Names?
  • Next by Date: Re: [NSMutableArray array]
  • Previous by thread: Re: [NSMutableArray array]
  • Next by thread: Re: [NSMutableArray array]
  • Index(es):
    • Date
    • Thread