Hi Andre,

On Tue, Feb 25, 2014 at 10:05 PM, Andre Hora <andrehoraa@gmail.com> wrote:



On Tue, Feb 25, 2014 at 8:33 PM, Gustavo Santos <gugajansen@gmail.com> wrote:
Hi everybody,

I'm currently trying to programatically copy a Moose model
Which model, Java or Smalltalk? 
It's a Smalltalk 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.
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.
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?

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)
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.

So, why this specific information is not set? Can we change this?
I don't think it is needed, or maybe I lost something in the lines :)
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.

Cheers,
--
Gustavo Santos

_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--
Andre Ho

_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


--
Gustavo Santos