Hi,
Nice questions.
On 12 Jun 2012, at 22:12, Stéphane Ducasse wrote:
just a question
why not
view := ROView new.
el1 := ROElement dragable.
or
view := ROView new.
el1 := ROElement new
el1 draggable
+ adds a shape decorator.
@ adds an interaction.
I quite like this part. Maybe draggable could be a nice addition, but I would prefer, in
general, to keep the API to a minimum and add convenience methods as they are needed in
practice. +RODraggable is quite simple once you get used with the idiom.
el1 + ROBox
blue.
what is the advantage over
el1 color: #blue
?
Indeed, blue is a convenience conceptual hack :). I guess the idea is that because Roassal
offers a DSL that also works on classes (not just instances) through default constructors,
it was just convenient to not have to add parentheses. But, it is a bit of a hack.
or
el1 := ROElement new
el1 box green ; draggable
to me the + and @ looks complex and a bit ugly.
Then I do not understand why we can give an extent: before saying that this is a box?
Currently, the Element defines the extent and the shape is drawn around this extent. I do
not like this either. I think the shape should hold the extent for the shape and the
Element bounds should be computed based on what the shapes are saying.
| view el1 el2
edge line |
view := ROView new.
el1 := ROElement new.
el1 draggable ; box blue.
el1 extent: 50@50.
el2 := ROElement new.
el2 draggable; box green.
el2 extent: 50@50.
looks better to me.
Hi!
I know this has been on the wished list of many of you. The following script produces:
<Screen Shot 2012-06-13 at 12.54.05 AM.png>
-=-=-=-=-=-=-=-=-=-=-=-=
| view el1 el2 edge line |
view := ROView new.
el1 := ROElement new.
el1 @RODraggable.
el1 extent: 50@50.
el1 + ROBox blue.
el2 := ROElement new.
el2 @RODraggable.
el2 extent: 50@50.
el2 + ROBox green.
el1 translateTo: 0 @ 100.
edge := ROEdge from: el1 to: el2.
line := ROLine new.
line add: ROArrow new offset: 0.1.
line add: ROArrow new offset: 0.5.
edge + line.
view add: el1; add: el2; add: edge.
view open
-=-=-=-=-=-=-=-=-=-=-=-=
I will remove ROArrowedLine very soon then
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
_______________________________________________
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
"What is more important: To be happy, or to make happy?"