Sorry, I made a mistake in my script
-=-=--=-=--=-=--=-=--=-=-
nodes := Collection withAllSubclasses.
view := MOViewRenderer new.
view nodeShape: (MORectangleShape new
width: [:each | each instVarNames size * 5 + 5];
height: [:each | each methodDictionary size + 5]
).
view nodes: nodes.
view edges: nodes from: [:each| each superclass] to: [:each | each].
view layout: (MOTreeLayout new).
view open
-=-=--=-=--=-=--=-=--=-=-
Still recovering from Christmas...
Alexandre
On 26 Dec 2008, at 16:10, Alexandre Bergel wrote:
Dear All,
I am spending some time on the Squeak Version of Mondrian.
It seems that there is a bug when on how edges are drawn.
For example, the following code draw some edges between nodes that
does not exist.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| view nodes |
nodes := Collection withAllSubclasses.
view := MOViewRenderer new.
view nodeShape: (MORectangleShape new
width: [:each | each instVarNames size * 5];
height: [:each | each methodDictionary size ]).
view nodes: nodes.
view edges: nodes from: [:each| each superclass] to: [:each| each].
view layout: (MOTreeLayout new).
view open
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
You can compare the result with the VW version:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| nodes |
nodes := Collection withAllSubclasses.
view newShape
rectangle;
width: [:each | each instVarNames size * 5];
height: [:each | each methodDictionary size];
withBorder.
view nodes: nodes.
view edges: nodes from: [:each| each superclass] to: [:each| each].
view treeLayout.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
I also fixed a bug related to the translation of edges. It is in
Mondrian@Squeaksource
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.