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

Re: subclassing NSArrayController


  • Subject: Re: subclassing NSArrayController
  • From: Allan Odgaard <email@hidden>
  • Date: Wed, 3 Mar 2004 20:23:37 +0100

On 3. Mar 2004, at 19:08, mmalcolm crawford wrote:

[...] neither NSArrayController nor its two superclasses [...] implements init:
This is misleading at best. Every class has a designated initialiser. In the absence of other initialisation methods, it is init. Whether or not NSObjectController or NSController implement init is irrelevant to the issue.

The problem I think is, that initWithCoder is not really part of the "designated initializer" convention.

If initWithCoder was the designated initializer, init in NSController would have to call it, but that makes no sense, because it has no decoder object to supply.

If on the other hand init was designated, then initWithCoder: would have to call [self init], but then imagine we have a superclass implementing initWithCoder and a subclass which does the same, the subclass will call [super initWithCoder:aCoder], and the superclass will then call the subclasses init method (and that will happen for each superclass which implement the initWithCoder:).
_______________________________________________
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: subclassing NSArrayController
      • From: mmalcolm crawford <email@hidden>
References: 
 >subclassing NSArrayController (From: Stefan Fisk <email@hidden>)
 >Re: subclassing NSArrayController (From: Allan Odgaard <email@hidden>)
 >Re: subclassing NSArrayController (From: Stefan Fisk <email@hidden>)
 >Re: subclassing NSArrayController (From: Allan Odgaard <email@hidden>)
 >Re: subclassing NSArrayController (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: Need Finder-like custom list contol in Cocoa
  • Next by Date: Re: subclassing NSArrayController
  • Previous by thread: Re: subclassing NSArrayController
  • Next by thread: Re: subclassing NSArrayController
  • Index(es):
    • Date
    • Thread