Re: Determining the 'primitive' methods of a class
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.