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

Re: self


  • Subject: Re: self
  • From: Clark Cox <email@hidden>
  • Date: Wed, 8 Jun 2005 15:58:07 -0400

On 6/8/05, Mark Lively <email@hidden> wrote:
>
> On Jun 8, 2005, at 8:13 AM, Clark Cox wrote:
>
> >
> >> for example the code:
> >>
> >> -(id) init {
> >>      self = [self initSpecial];
> >>      return self;
> >> }
> >>
> >> should alter everything in exactly the same way as:
> >>
> >> -(id) init {
> >>      return [self initSpecial];
> >> }
> >>
> >
> > Yes.
>
> Maybe.

No, it is a definite YES

> If initSpecial calls [super init], some supers discard the original
> object and return a new one.
>
> I am fairly certain; I haven't tested it so YMMV, but the
> NSDictionary returned by initWithObjectsAndKeys is not the one you
> alloc'ed.

While this is correct, it is also irrelevant in this case. In both
cases, whatever value is returned by initSpecial (whether it be the
same object or not) is returned by init.

--
Clark S. Cox III
email@hidden
http://www.livejournal.com/users/clarkcox3/
http://homepage.mac.com/clarkcox3/
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >self (From: "Theodore H. Smith" <email@hidden>)
 >Re: self (From: Clark Cox <email@hidden>)
 >Re: self (From: Mark Lively <email@hidden>)

  • Prev by Date: Best place to create CGLayers
  • Next by Date: Re: Why are BOOL and bool distinct types?
  • Previous by thread: Re: self
  • Next by thread: Re: self
  • Index(es):
    • Date
    • Thread