• 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: Properly writing an Init method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Properly writing an Init method


  • Subject: Re: Properly writing an Init method
  • From: Ondra Cada <email@hidden>
  • Date: Wed, 17 Jul 2002 22:37:17 +0200

On Wednesday, July 17, 2002, at 08:24 , Julian Barkway wrote:

The above discussion is very interesting but there's also another point in the example code. I have often wondered about the merits of 'self = [super init]'. Surely this means that 'self' effectively becomes typed to the superclass rather than the class itself?

'Course not. This is dynamic type system, not a static one.

My own feeling is that, other than in exceptional circumstances, assigning anything to 'self' is not a good idea. Anyone care to comment?

Very true, but this is exactly the exceptional circumstance.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Properly writing an Init method
      • From: Julian Barkway <email@hidden>
References: 
 >Re: Properly writing an Init method (From: Julian Barkway <email@hidden>)

  • Prev by Date: Re: Properly writing an Init method
  • Next by Date: Putting an Image Cell in NSTableView
  • Previous by thread: Re: Properly writing an Init method
  • Next by thread: Re: Properly writing an Init method
  • Index(es):
    • Date
    • Thread