[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Sep 14 14:54:41 1994 
Subject:flavour-question 
From:Monika Sester 
Volume-ID:940915.01 

hi,
in the flavours documentation of the pop-manual i found an elegant way of 
keeping track of all instances of a given flavour:

	flavour setmember a metaflavour isa flavour;
		ivars set = [];
		defmethod after new(x) -> x;
			x::set -> set;
		enddefmethod;
	endflavour;

	flavour person a setmember isa named_object;
	endflavour;

objects of flavour person are stored in the set-slot of the flavour:

	make_instance([person name sue]) -> p1;
	make_instance([person name tom]) -> p2;

	p1 => <object sue>

	person_flavour <- set =>
	[<object sue> <object tom>]

here comes my question:
if i create a new flavour, which is a subclass of the person_flavour, why 
don't i inherit the set-facility ???

e.g. if i create a subclass of people living in a city, 

	flavour city_person isa person;
	endflavour;

	make_instance([city_person name nika]) -> cp1;

	city_person_flavour <- set =>

yields the following answer: 

;;; MISHAP - UNRECOGNISED MESSAGE
;;; INVOLVING:  set <flavour city_person> 
;;; DOING    :  vanilla<-default_method compile pop_setpop_compiler 

is there anyone who knows why i don't get
	[<object nika>]


thanks a lot for answers