In menssana, I wanted to be able to describe a property by only specifying
its 'key' from the 'privateState' dictionary, without caring if some
setters
and getters exist.
Concretly , When building the metamodel for a concern, I can write:
aFameMMBuilder package: 'FAMIX' with: [
aFameMMBuilder class: 'Class' with: [
aFameMMBuilder property: #WLOC with: #Number.
aFameMMBuilder property: #NOM with: #Number.
aFameMMBuilder property: #NOA with: #Number.
]
].
I guess I could specify the corresponding selectors (or implement them)
instead.
it was simon that implemented that, maybe I do not have all the reasons in
mind
2011/4/9 Tudor Girba <tudor.girba(a)gmail.com>
Hi Cyrille,
I see that you added the mmGetProperty: / mmSetProperty:to methods back in
MooseEntity. They are not correct because they depend on the internals of
the PropertyDescription, and they change the semantics of the method defined
in Object:
mmGetProperty: aFM3PropertyDescription
(self class canUnderstand: aFM3PropertyDescription
implementingSelector)
ifTrue: [ ^ self perform: aFM3PropertyDescription
implementingSelector ]
ifFalse: [ ^ self propertyNamed: aFM3PropertyDescription
name ].
mmSetProperty: aFM3PropertyDescription to: value
(self class canUnderstand: aFM3PropertyDescription
implementingSelector asMutator)
ifTrue: [ self perform: aFM3PropertyDescription
implementingSelector asMutator with: value ]
ifFalse: [self propertyNamed: aFM3PropertyDescription name
put: value].
This breaks Metanool and it is not nice. The comment of your commit says
that you are using it in Menssana. I am sure we can find another solution.
So, could you describe the scenario you are using it in?
Cheers,
Doru
--
www.tudorgirba.com
"Beauty is where we see it."
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev