You're right Simon.
That was on my todo list, but since it was working and the speed was
acceptable. Feel free to update this.
Alexandre
On 6 Mar 2009, at 10:29, Tudor Girba wrote:
Hi Simon,
Indeed, this should not happen anymore.
Cheers,
Doru
On 5 Mar 2009, at 16:36, Simon Denier wrote:
> Hi there
>
> I browse the code of SqMondrian to understand how it works (with
> the previous help of Alex) and after a while, I wondered how the
> traversal of nodes and edges was really done.
>
> It seems like traversing the graph and drawing shapes are deeply
> intertwined.
>
> It took me a bit of time to figure out, but it seems that the
> following method defined for the nil object is very important :)
>
> UndefinedObject>>display: anElement on: aCanvas
> anElement display: anElement on: aCanvas
>
> The call sequence look like:
> @rootnode#displayOn: -> nil#display: rootnode on: aCanvas -> (...)
> rootnode children#displayOn: aCanvas -> ... -> shape#display: aNode
> on: aCanvas -> nil display: aNode on: aCanvas -> aNode
> children#displayOn: aCanvas -> .....
>
> Or, from Root to nil to root children to child shape to nil to
> child to children of child to shape to nil to ....etc.
>
> It's quite weird how it always goes through nil to launch and
> continue the traversal :)
>
>
>
> Not discussing the previous design which had its own reason, but
> now that we have separate composite shape, I think we can also
> separate the nodes traversal logic from the shape drawing logic for
> clarity.
>
>
> --
> Simon
>
>
>
> _______________________________________________
> Moose-dev mailing list
> Moose-dev(a)iam.unibe.ch
>
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"It's not how it is, it is how we see it."
_______________________________________________
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
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.