Status: New Owner: ---- Labels: Type-Defect Priority-Medium
New issue 872 by benjamin...@gmail.com: Roassal refactor RubberBand>>onDrop: http://code.google.com/p/moose-technology/issues/detail?id=872
ROExample>>rubberBandOn: currently has the line... rawView add: (newEdgeRaw + ROLine).
While this is fine in the ROExample script, in my application rawView was not available at that point, so instead I needed... newEdgeRaw from view add: (newEdgeRaw + ROLine).
For a while I confused myself by trying to use... newEdgeRaw view add: (newEdgeRaw + ROLine).
but that was not the same view, since the ROEdge created in the sender had a random default.
So I now think it is more clear to not create the ROEdge in the sender, but instead pass the fromElement and toElement and let the user create the ROEdge themselves. I think this is conceptually clearer.
See the two methods in the attached changeset.
Attachments: RubberBand-20121125.1.cs 2.4 KB
Comment #1 on issue 872 by tu...@tudorgirba.com: Roassal refactor RubberBand>>onDrop: http://code.google.com/p/moose-technology/issues/detail?id=872
Not having the rawView available in your code is probably wrong. You should always pass the builder through your building code. That is why, for example, all visualizations in Moose have both a viewXYZ unary method for opening the visualization, and a viewXYZOn: one for composition purposes.
So, I think this is not a valid concern.
Updates: Status: Fixed
Comment #2 on issue 872 by alexandr...@gmail.com: Roassal refactor RubberBand>>onDrop: http://code.google.com/p/moose-technology/issues/detail?id=872
It is in Roassal 1.198. This .cs only impact two methods. I would like to see a nice support of drag and drop in Roassal. This is essential.
Comment #3 on issue 872 by benjamin...@gmail.com: Roassal refactor RubberBand>>onDrop: http://code.google.com/p/moose-technology/issues/detail?id=872
Doru, I'm glad to receive your advice and so I reviewed my code with a critical eye against all the viewXYZOn: that I could find. I note that most of the viewXYZOn: seem to create a whole view having just one or a few different shapes/interactions/layouts - whereas I am having over 50 shapes with several nestings each with a different layout, so I have pushed creation of elements out to their matching model classes. Perhaps not he best way but it is what I ended up with at the moment and cannot change right now as I near the finish line of my Masters.
In any case, even if rawView was available, I think still clearer this way. It was only the other way because that is what I came up with myself, and at the time I was flipping between the two different implementations, and in hindsight this is better.
Comment #4 on issue 872 by benjamin...@gmail.com: Roassal refactor RubberBand>>onDrop: http://code.google.com/p/moose-technology/issues/detail?id=872
Thanks Alexandre. That works fine.
Updates: Labels: Milestone-4.7 Component-Roassal
Comment #5 on issue 872 by tu...@tudorgirba.com: Roassal refactor RubberBand>>onDrop: http://code.google.com/p/moose-technology/issues/detail?id=872
(No comment was entered for this change.)