RTElement>>update update the Trachel shape by recomputing it using the Roassal
shape.
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Jul 3, 2014, at 3:12 PM, Leo Perard <leo.perard(a)gmail.com> wrote:
No not for me at least. I don't want to see the
code of the visualization.
But I was wondering, if I have to modify the trachelShape and not the rossal shape, why
the update refresh the roassal shape ? It should not update the trachelShape instead of
the roassal one ?
On Thu, Jul 3, 2014 at 9:07 PM, Alexandre Bergel <alexandre.bergel(a)me.com> wrote:
Hard to make decisions that are both intuitive and easy to use.
Maybe an element should not know about its roassal shape. But being able to “reset” the
visual aspects of an element is interesting. Especially if its model has changed. For
example:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| v |
v := RTView new.
v @ RTDraggableView.
shape := RTBox new
width: [ :c | c numberOfVariables max: 5 ];
height: [ :c | c numberOfMethods max: 5 ].
elements := shape elementsOn: RTObject withAllSubclasses.
v addAll: elements.
RTFlowLayout on: elements.
elements @ RTPopup.
v canvas addMenu: 'Refresh' callback: [ v elements do: #update ].
v
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
You can leave this visualization open, and modifying your code. Pressing the ‘Refresh’
button will update the size of all your classes.
Does this example convince you?
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
On Jul 3, 2014, at 5:09 AM, Goubier Thierry <thierry.goubier(a)cea.fr> wrote:
Le 03/07/2014 10:53, Guillaume Larcheveque a écrit :
2014-07-03 10:30 GMT+02:00 Yuriy Tymchuk <yuriy.tymchuk(a)me.com
<mailto:yuriy.tymchuk@me.com>>:
For me it’s completely fine.
Shape is a shape, and then elements can use to show themselves.Now
if you have a sale and change it’s color then all the elements show
this shape with different color. If you need things with different
colors, you need different shapes.
It creates a kind of implicit group that is not really easy to
understand and to maintain. If you want to change the color or any other
property of a shape on lots of elements, a better way would be to use a
group and then ask to this group to change and update all its elements.
It's terribly confusing to change a single element and to have a
modification on every elements that were created in the same way. In
addition those elements will not be updated soon so you will not see
that they changed until you update them.
Read:
Lightweight Design Pattern :) A perfectly understandable design decision from Roassal in
the context of graphics... just don't forget the side effects.
Now a copy on write design for shapes could be nice (create a derived shape object once
you start changing some attributes of an element), as well as a context design (arrange so
that some attributes changes such as highlighting are a property of the element and do not
require creation of the shape).
Alexandre, I think this is your call :)
Other thing is that it would be nice to have some highlight option,
so you don’t need to create 1000 shapes only if you can to be able
to highlight individual element.
+1. See above, but remember that even the copy on write design does the creation lazily
(only when highlighting, not when deciding to allow possible highlighting).
Thierry
--
Thierry Goubier
CEA list
Laboratoire des Fondations des Systèmes Temps Réel Embarqués
91191 Gif sur Yvette Cedex
France
Phone/Fax: +33 (0) 1 69 08 32 92 / 83 95
_______________________________________________
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
--
Cheers,
Leo Perard
University of Lille 1
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev