discuss-gnustep
[Top][All Lists]
Advanced

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

Subclassing NSString?


From: Frederic
Subject: Subclassing NSString?
Date: Tue, 02 Jan 2001 01:09:06 +0100

Hi,

I need to create NSString which are unique in memory. (I actually need
that for performance reasons).
So I decided to subclass NSString and create a class method
+(id)keyWithString:(NSString*)keyName which 
looks first in a hashtable to ensure it returns a singleton.
But when invoking [[MyNSStringSubClass] alloc] initWithString:keyName],
it fails saying:
"subclass ASKey should override
initWithCharactersNoCopy:length:freeWhenDone:"

Is this really necessary and how should I do that?

Thanks in advance,
Frederic



reply via email to

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