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.
On 6 Mar 2009, at 10:29, Tudor Girba wrote:
Indeed, this should not happen anymore.
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
> 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
> Moose-dev mailing list
"It's not how it is, it is how we see it."
Moose-dev mailing list
Alexandre Bergel http://www.bergel.eu