View · Search · Index
No registered users in community xowiki
in last 10 minutes

[Xotcl] Ordering of Children

From: Matthew Dodwell <mjd_at_orcaspirit.co.uk>
Date: Wed, 1 Feb 2006 13:18:28 -0000

Hi,

Hopefully a simple question.

I'm building a tree view controller and am seeing an unexpected ordering
issue. I add with;

MemoryLineController instproc init {} {
        my AddNode "File Diagnostics"
        my AddNode "Real time Diagnostics"
        my AddNode "Graphs"
        my AddNode "Post-Processing"
}

MemoryLineController instproc CreateTreeview {} {

        set counter 1
        foreach childNode [my info children *gNode*] {
                $childNode BuildTreeNode [my tree] $counter
                incr counter
        }
}

MemoryLineController instproc AddNode {name} {
    eval GUINode [self]::[my autoname gNode%02d] -DisplayName {$name}
}

So the init method adds my root level nodes
The order I get out is;
        Post-Processing
        File Diagnostics
        Real time Diagnostics
        Graphs
i.e. the last is displayed first and then the next 3 in order. Why is this
and what is the best way to correct it?

thanks
    Matthew