• 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: Determining the 'primitive' methods of a class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining the 'primitive' methods of a class


  • Subject: Re: Determining the 'primitive' methods of a class
  • From: Ben Dougall <email@hidden>
  • Date: Tue, 14 Oct 2003 17:27:55 +0100

On Tuesday, October 14, 2003, at 04:27 pm, Matt Gough wrote:

My interpretation of the section on primitives in:
<http://developer.apple.com/documentation/Cocoa/Conceptual/Foundation/ Concep
ts/ClassClusters.html>

i don't think that that document gives the full picture of subclassing class clusters, especially the pre-made cocoa class clusters. (i'm not up on the full picture myself but i do know that document is a little economical with the necessary details unfortunately)

1. Is my understanding of what constitutes a primitive wrong, or is
NSScanner 'wrong'?

usually the primitive methods are specified in the documentation i've found - not in nsscanner's case though for some reason, that i can see.

according to the book cocoa programming to create a new concrete subclass of a class cluster's abstract class these rules should be followed:

the new class must over-ride the superclass's primative methods.
the new class must over-ride all the superclass's initialiser methods or risk exceptions.
every initialiser in the new class must call its superclass's designated initialiser, which is always -init for abstract interface to a class cluster.

also from cocoa programming:

the rule that every initialiser in the class cluster's interface must be over-ridden to avoid exceptions is particularly difficult to follow in this case because apple failed to document one of NSString's most important initialisers.

it strikes me that subclassing a cocoa class cluster is pretty darn problematic. one thing that may be helpful possibly is looking at the source from gnustep <http://www.gnustep.org/> but i have no idea how similar or different it is from cocoa's source.
_______________________________________________
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.
References: 
 >Determining the 'primitive' methods of a class (From: Matt Gough <email@hidden>)

  • Prev by Date: Re: how to warn users of wrong system
  • Next by Date: Reading binary file into NSString
  • Previous by thread: Determining the 'primitive' methods of a class
  • Next by thread: Reading binary file into NSString
  • Index(es):
    • Date
    • Thread