Messages from list : cormas@cirad.fr

Choose a topic among the following archives :

Re: two problems

New Message Reply Date view Thread view Subject view Author view

Subject: Re: two problems
From: Cesar Rabak (cesar.rabak@gmail.com)
Date: Tue Feb 28 2006 - 18:06:07 CET

Romain Lorrilliere wrote:
> thanks for your answer.
>
> But my question is : Why do I need to make those methods ?
>
> The UML structure of my models is as follows :
>
> LocatedAgent
> |- TurtleNat
> |- TurtleNatMale
> |- TurtleNatFemale
>
> My problem is that I created the classes TutleNatMale and
> TurtleNatFemale which inherit of the class TurlteNat, then CORMAS (or
> smalltalk) created the lists "theTurlteNats", "theTurtleNatMales" and
> "theTurtleNatFemales". But the list "theTurlteNats" remains empty while
> "theTurtleNatMales" and "theTurtleNatFemales" are fulfilled. Why?

How are theTurtleNatMales and theTurtleNatFemales initialized in your
model? Do you have attributes in you map or something like that?

If so, there is no way CORMAS would know it has to init theTurlteNats as
  well.

I see two ways of doing it: overload the super class method that makes
the magic for the ordinary classes or a specific init like the
updateTurtleNat you already have.

-- 
Cesar Rabak
GNU/Linux User 52247.
Get counted: http://counter.li.org/

New Message Reply Date view Thread view Subject view Author view
 

Back to home