
novice question: subtyping String class?
I'd like to write some methods to add some awk-like features to
Smalltalk's
string handling. (sub, gsub, etc.) I thought I'dsubclass String and then write
the methods for that, knowing that itwill inherit copyFrom:to: and the other
built-in String methods. But,once I define a variable-byte subclass of string,
I can't assign to it.
X Fstring new. " Flexible String "
X := 'abcdefg'
just redefines X as a regular String in the second line, and if I write
a method
set: aString
self := aString
for FString, it doesn't work. I have a feeling that I'm musunderstanding
something basic here.
thanks,
Bob DuCharme