Hi everybody,
I'm currently trying to programatically copy a Moose model What happens is that only the message isInterface returns nil, when the original Moose model has this information. All the other "is*" messages return something or false. I have no problem copying other information from the model whatsoever. Looking at the code, this variable is directly set on FAMIXClass>>#isInterface: and the other ones use the FAMIXNamedEntity>>modifierSet:for: message (lazy attribution I guess)
So, why this specific information is not set? Can we change this? Cheers, -- Gustavo Santos
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
On Tue, Feb 25, 2014 at 8:33 PM, Gustavo Santos <[hidden email]> wrote:
Which model, Java or Smalltalk?
In a Smalltalk model #isInterface returns false, which is ok. I don't know how you obtain nil because the default is false (see FAMIXClass>>isInterface). OK, the instance variable is nil, so maybe you are in a subclass of FAMIXClass accessing this instance variable. In this case you should call the *getter method* #isInterface to get false instead of nil.
No, this is not lazy attribution; modifiers is only a Set (see the method FAMIXNamedEntity>>initialize) which is used in order to avoid create instance variables. isInterface is an instance variable, so it does not need to use the modifiers.
I don't think it is needed, or maybe I lost something in the lines :)
Andre Ho _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Hi Andre, On Tue, Feb 25, 2014 at 10:05 PM, Andre Hora <[hidden email]> wrote:
It's a Smalltalk model
Yes. The thing is that I'm copying the state of the entity, so I don't have to write a lot of set's and get's. Probably this method is never called because, in the properties, isInterface is still nil. But why this case only?
For now, I'm saving a temporary variable the result of the getter call for each FAMIXClass, and then setting this information after the state and attributes are set.
-- Gustavo Santos
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
When I was copying some entity, I do not perform get so, in the state of this entity, the value of isInterface was still nil.
I added the initialize message in FAMIXClass only to set the value of its instance variable (isInterface) to a default value. It works now. Thanks Andre for the feedback On Wed, Feb 26, 2014 at 10:49 AM, Gustavo Santos <[hidden email]> wrote:
-- Gustavo Santos
_______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |