Hi,
I would like to build custom magritte view for a FAMIX model, however it seems that Fame/Metanool are somehow interfering with it..
Imagine a simple model (a class with an attribute): ~~~~~~~~~~~~~~~~~~~~~~~~~~~ cls := FAMIXClass new name: 'Something'.
(attr := FAMIXAttribute new) name: 'myAttribute'; declaredType: (FAMIXClass new name: 'OtherThing').
cls addAttribute: attr. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
now I can open the magritte description ~~~~~~~~~~~~~~~~~~~~~~~~~~~ attr mooseDescription asMagritteDescription asMagritteMorph openInWindow. ~~~~~~~~~~~~~~~~~~~~~~~~~~~ However this is a meta description, which I don't want...
So second option was to build it manually; I extract descriptions that I am interested in.... ~~~~~~~~~~~~~~~~~~~~~~~~~~~ container := MAContainer new addAll: ({ attr mooseDescription at: 'name'. attr mooseDescription at: 'declaredType'. } collect: #asMagritteDescription).
(container asMorphOn: attr) openInWindow. ~~~~~~~~~~~~~~~~~~~~~~~~~~~
However the problem with this is, that the declaredType is presented as TextField, which is not very useful.
So I'm kind of lost...
basically what I want to do is to have a MAContainer that contains both the Attribute's name and #declaredType's name.
Is this possible?
Thanks, Peter
Hi,
Metanool offers you a way to define new properties and edit those. Thus, it works at the FM3 level (which is a meta-model of FAMIX).
You seem to want to work directly at FAMIX level. This means that you just have an object, which happens to be a FAMIXClass instance, and want to describe it with Magritte.
For example, for adding a Name property, you can add this method:
FAMIXClass>>descriptionName <magritteDescription> ^ MAStringDescription new accessor: #name; label: 'Name'; yourself
And you get:
[image: Inline image 1]
[image: Inline image 2]
What would you expect to get for declaredType?
Cheers, Doru
On Mon, Sep 21, 2015 at 5:25 PM, Peter Uhnák i.uhnak@gmail.com wrote:
Hi,
I would like to build custom magritte view for a FAMIX model, however it seems that Fame/Metanool are somehow interfering with it..
Imagine a simple model (a class with an attribute):
cls := FAMIXClass new name: 'Something'. (attr := FAMIXAttribute new) name: 'myAttribute'; declaredType: (FAMIXClass new name: 'OtherThing'). cls addAttribute: attr.
now I can open the magritte description
attr mooseDescription asMagritteDescription asMagritteMorph openInWindow.
However this is a meta description, which I don't want...
So second option was to build it manually; I extract descriptions that I am interested in....
container := MAContainer new addAll: ({ attr mooseDescription at: 'name'. attr mooseDescription at: 'declaredType'. } collect: #asMagritteDescription). (container asMorphOn: attr) openInWindow.
However the problem with this is, that the declaredType is presented as TextField, which is not very useful.
So I'm kind of lost...
basically what I want to do is to have a MAContainer that contains both the Attribute's name and #declaredType's name.
Is this possible?
Thanks, Peter