Hey Dario,
I can try and help.
On Tue, Feb 16, 2010 at 6:34 AM,
dtrussardi@tiscali.it <dtrussardi@tiscali.it> wrote:
Hi,
i'm interested to display and change the priority of MADescription components when the browser display Halos.
For example i have a class with descriptionA, descriptionB.
For display the priority i change the WAClassnameHaloPlugin renderOn: method.
For change i create the WAPriorityHaloPlugin.
In the relative execute method i test if component is anMAComponent : self target description respondTo: #priority .
If yes i,m interested to open the Browser or WABrowser on the relative descriptionA.
The first question is: how i can define the name of descriptionA from anObject with magritte structure ?
into execute context of WAPriorityHaloPlugin i see aObject with memento, description, accessor ..... but i d'ont found link to the relative generating descriptionA.
Given that aObject's description is a container you can iterate through the contained descriptions looking for a match on the selector of the description.
aObject description detect: [ :each | each accessor selector = #theSelectorIWant ]
The problem is: at this level i d'ont understand the description name ( descriptionA )relative to the magritte component.
Any magritte component ( create with descriptionA descriptionB descriptionX relative to one class ) when rendering with halo view, is display with the relative WAPriorityHaloPlugin anchor.
Now assume to click on anchor relative to component create with descriptionA i go into relative 'execute' context of WAPriorityHaloPlugin where i found a specific aObject with memento, description, accessor,
but i d'ont found, a this level, any link to the original descriptionA.
I can add property to the descriptionA define method:
descriptionA
^(MABooleanDescription new)
autoAccessor: #attivo;
checkboxLabel: 'Account attivo';
label: 'Attivo';
priority: 4030;
propertyAt: #descriptionName put: #'descriptionA';
.........
but with this solution i need to change all the descriptions.