Hi, On Saturday 03 April 2004 16:15, Leopold Toetsch wrote: > I meant object usage vs data in properties. When you derive a new class > from Stream its properties are lost. You can only reuse methods. > > I'd do: > newclass: > addattribute class, "source" > # and define .constant STREAM_SOURCE_OFFS 0 > ... > > __init method > $I0 = classoffset self, "Stream" > $I0 += .STREAM_SOURCE_OFFS > $P0 = new PerlUndef > setattribute self, $I0, $P0 > ... > > and maybe an accessor function: > > _source method > $I0 = classoffset self, "Stream" > $I0 += .STREAM_SOURCE_OFFS > $P0 = getattribute self, $I0 > unless argcP goto get_source > # set source > get_source: > .return $P0 Hmm, I thought attributes are per class and all instances are sharing them?
> leo jens