|
From: Bryan O. <br...@bi...> - 2004-09-24 03:52:45
|
Joe English wrote:
> I hadn't considered this, but am open to suggestions.
> The Tk way of doing this would be a linked -variable;
> but for the tree widget the contents of the variable
> would have to be a fairly complicated structure.
Couldn't it just be an array (or dict)?
array set data {
0 "/"
0,0 "usr"
0,0,0 "local"
0,0,0,0 "bin"
0,0,0,0,1 "tclkit"
0,0,0,0,2 "tclsh"
0,0,0,0,3 "wish"
0,0,0,1 "lib"
0,1 "etc"
0,1,0 "hosts"
0,1,1 "passwd"
...
}
One could fetch all the children of, say, /usr/local/bin via [array
names data 0,0,0,0,*], and so on.
I'll admit I haven't really thought this through, but it seems like a
reasonable approach on the surface.
|