Sorry : MASingleOptionDescription : 'options:' which depends of an instance attribute

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Sorry : MASingleOptionDescription : 'options:' which depends of an instance attribute

Florent Trolat-2

Hi,

An object A have a collection of objects B. each objects B have a collection of objects C, and finnaly each object C have an attribute wich references an object B take in the collection of A.

A 1<=>* B 1<=>* C 1<=>1 B among the Collection of A


My problem :

In a description can I acces to the object which is currently describe?
I use a class variable style 'myCurrentObject' which I feel before compute the descritption but it smells bad... :-/

I hope that I've been understandable  ;-)

Florent.  :-)  


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: Sorry : MASingleOptionDescription : 'options:' which depends of an instance attribute

Lukas Renggli-2
> [...]
>
> I hope that I've been understandable  ;-)

I don't exactly understand what you described, though I think I  
understand the problem described in the subject of your mail.

It is the easiest if you override #description on the instance-side  
of your object and manually add/change (a copy of) the  
MAOptionDescription to hold the objects you want in the list of options.

This is one of the things I would like to get fixed in the next big  
change of Magritte: have descriptions that belong to the instance  
being defined on the instance side, so that they can differ depending  
on the state of the model.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Smallwiki mailing list
[hidden email]
http://impara.de/mailman/listinfo/smallwiki