Hi Cyrille,
I now removed these methods from MooseEntity. Please let me know if you have problems with
creating explicit properties.
Cheers,
Doru
On 11 Apr 2011, at 20:47, Tudor Girba wrote:
Hi Cyrille,
I understand the use of it, but in your builder you can actually create proper instances
of FM3Property that would know how to get and set from the private.
If you look in Metanool, you will see a MTLAnnotationDescription which does exactly that.
I will probably add this to ConfigurationOfMoose soon.
Cheers,
Doru
On 11 Apr 2011, at 10:29, Cyrille Delaunay wrote:
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
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"Sometimes the best solution is not the best solution."