[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString changes breaks...

From: richard
Subject: Re: NSString changes breaks...
Date: Tue, 31 Oct 2000 18:13:59 +0000

On Tuesday, October 31, 2000, at 04:55 PM, address@hidden wrote:

> Hello, 
> It seems that changes in NSString breaks GNUstepWeb. 
> There's a GSWElementIDString class which inherit from NSMutableString 
> Now, when we get this exception: 
>         subclass GSWElementIDString should override 
> initWithCharactersNoCopy:length:freeWhenDone: 
> GSWElementIDString doesn't have any ivar. It's just an empty class with a 
> category. 
> As far as I understand changes, NSMutableString seems to be now an empty 
> class too which 
> allocate a GSMStringClass. So do I have to make GSWElementIDString inherit 
> from 
> GSMStringClass (which seems to be a 'private' class) or is there a better 
> solution ? 

I asked on the MacOS-X developer mailing list, and got this very clear reply 
that tells me
that the current GNUstep implementation is ok (well, MacOS-X compatible anyway) 

From: address@hidden
Date: Tue Oct 31, 2000  05:58:28 PM Europe/London
To: address@hidden
Cc: MacOSX Dev <address@hidden>
Subject: Re: Subclassing class clusters - a little question
In-Reply-To: <address@hidden>
X-Authentication-Warning: mail set sender to 
address@hidden using -f
X-Mailer: Apple Mail (2.353)
X-Mime-Autoconverted: from quoted-printable to 8bit by id 

You need to implement just the initializers that you need. If you don't need 
any of the initializers offered in the root class of the cluster, you don't 
need to implement/override those.  

Note that unless otherwise explicitly documented, you usually do not inherit 
the init behaviors from the root class. (For example: NSString has a bunch of 
init methods, and some might actually call other init methods. However, we 
don't document any of the init methods as being primitive vs not, so do not 
count on any of them to be available to your subclasses. So, in any subclass of 
NSString you create, be sure to implement any init methods you will need on 
your subclass. Typically this is a very small set, as most subclasses of 
NSString are created for specialized uses, with certain implementation and 
usage patterns in mind.)


Begin forwarded message:

> From: address@hidden
> Date: Tue Oct 31, 2000  09:40:56 AM US/Pacific
> To: MacOSX Dev <address@hidden>
> Subject: Subclassing class clusters - a little question
> Reply-To: address@hidden
> Can anyone give me a definative answer to this ...
> When subclassing a class cluster, should the initialiser for the
> class be treated as a primitive method?
> ie. Are you required to implement the initialiser in your subclass
> or can you depend on the abstract class having a harmless implementation?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]