I do not like "el1 draggable" because I want to keep ROElement as small as
possible.
I do not see the point.
You can package extension in separate package and use class extension so ?
Now what I see is verbose code.
This is why you have to write:
el1 @ RODraggable
or:
el1 addInteraction: RODraggable
or:
RODraggable initializeElement: el1
I would not describe the last one.
I favor el1 draggable because it is concise and says what is does.
All these 3 formulation are the same.
I favor @ because it is shorter. Shall I remove it? What is the general opinion on this?
Personally I think that @Dragable will just break effort of type inferencer and this is
sad.
Same for +
el1 +
ROBox blue.
what is the advantage over
el1 color: #blue
you can have: el1 + (ROBox new color: Color blue)
Same remark as above I think color: #blue more smalltalk oriented than + and
(ROBox new color:….) is verbose.
?
or
> el1 := ROElement new
> el1 box green ; draggable
by doing "el1 + ROBox" I am sure that the class ROElement does not know at all
about boxes and colors.
Your argument does not hold. because we are not in Java and you could package nicely ROBox
in a separate
package and have some nice class extensions.
What I do not like with + is that + is functional and now you use it to modify
conceptually the receiver.
+ is not equal to add:
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 you can. But following the discussion I had last week with Doru, it seems wiser
to have the shape decide the extent and not the element itself.
Ok I understand that point.
Cheers,
Alexandre
| 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
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
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