Hello I am making some modifications in the smalltalk meta-model and i need to replace classes with Ring classes (it is supposed to be possible since they are polymorphic) But i am having a little problem, all the classes know how to answer the message "isObsolete" but Ring classes doesn't, to solve this i have defined the method "isObsolete" in RGBehaviorDefinition but i am not sure which code does it need - if i copy and paste the code from Behavior, then i obtain more "doesNotUnderstand" messages since the code from Behavior>>isObsolete is "self instanceCount = 0" but Ring classes doesn't know how to answer "instanceCount" neither so i suspect this is not the right way to do it. - if i copy the code from Class, then it seems it works, but the result from for example "Array isObsolete" is different of the result from "Array asRingDefinition isObsolete" consequently next messages obtain different results and finally a a "doesNotUnderstand" message again. Am i doing something wrong? Any suggestion?
On 15 May 2013 11:29, Sebastian Tleye <stleye@gmail.com> wrote:
Hello
I am making some modifications in the smalltalk meta-model and i need to replace classes with Ring classes (it is supposed to be possible since they are polymorphic) But i am having a little problem, all the classes know how to answer the message "isObsolete" but Ring classes doesn't, to solve this i have defined the method "isObsolete" in RGBehaviorDefinition but i am not sure which code does it need
- if i copy and paste the code from Behavior, then i obtain more "doesNotUnderstand" messages since the code from Behavior>>isObsolete is "self instanceCount = 0" but Ring classes doesn't know how to answer "instanceCount" neither so i suspect this is not the right way to do it.
- if i copy the code from Class, then it seems it works, but the result from for example "Array isObsolete" is different of the result from "Array asRingDefinition isObsolete" consequently
well.. #isObsolete for model classes doesn't makes any sense. i would just answer false to this message. and i would ask why this message is ever sent. because this is not something essential to class model.
next messages obtain different results and finally a a "doesNotUnderstand" message again.
Am i doing something wrong? Any suggestion?
-- Best regards, Igor Stasenko.
Thanks Igor, i think you are right. I am not sure what "isObsolete" does, but for Ring classes, which are created dinamically, it doesn't seem that "isObsolete" is useful. (at least is my intuition) 2013/5/15 Igor Stasenko <siguctua@gmail.com>
On 15 May 2013 11:29, Sebastian Tleye <stleye@gmail.com> wrote:
Hello
I am making some modifications in the smalltalk meta-model and i need to replace classes with Ring classes (it is supposed to be possible since they are polymorphic) But i am having a little problem, all the classes know how to answer the message "isObsolete" but Ring classes doesn't, to solve this i have defined the method "isObsolete" in RGBehaviorDefinition but i am not sure which code does it need
- if i copy and paste the code from Behavior, then i obtain more "doesNotUnderstand" messages since the code from Behavior>>isObsolete is "self instanceCount = 0" but Ring classes doesn't know how to answer "instanceCount" neither so i suspect this is not the right way to do it.
- if i copy the code from Class, then it seems it works, but the result from for example "Array isObsolete" is different of the result from "Array asRingDefinition isObsolete" consequently
well.. #isObsolete for model classes doesn't makes any sense. i would just answer false to this message. and i would ask why this message is ever sent. because this is not something essential to class model.
next messages obtain different results and finally a a "doesNotUnderstand" message again.
Am i doing something wrong? Any suggestion?
-- Best regards, Igor Stasenko.
On May 15, 2013, at 9:43 PM, Sebastian Tleye <stleye@gmail.com> wrote:
Thanks Igor, i think you are right. I am not sure what "isObsolete" does, but for Ring classes, which are created dinamically, it doesn't seem that "isObsolete" is useful. (at least is my intuition)
Obsolete classes happen if you delete a class, yet there are still instances. This is needed as classes do not model history. But a) Ring classes are not directly instantiated (they are not referenced from the header of the instances) b) They even are able to model history very nicely So the obsolete concept makes no sense⦠an obsolete class might even have a (Historical) Ring class associated with it and Ring would have no problem at all. Marcus
Thanks Marcus! 2013/5/16 Marcus Denker <marcus.denker@inria.fr>
On May 15, 2013, at 9:43 PM, Sebastian Tleye <stleye@gmail.com> wrote:
Thanks Igor, i think you are right. I am not sure what "isObsolete" does, but for Ring classes, which are created dinamically, it doesn't seem that "isObsolete" is useful. (at least is my intuition)
Obsolete classes happen if you delete a class, yet there are still instances. This is needed as classes do not model history. But a) Ring classes are not directly instantiated (they are not referenced from the header of the instances) b) They even are able to model history very nicely
So the obsolete concept makes no sense⦠an obsolete class might even have a (Historical) Ring class associated with it and Ring would have no problem at all.
Marcus
participants (3)
-
Igor Stasenko -
Marcus Denker -
Sebastian Tleye