tree view hide key
Mike Kerner
MikeKerner at roadrunner.com
Wed Oct 31 12:07:35 EDT 2018
I was thinking about using it for a directory view. It seemed like a
natural fit - nodes are subdirectories and leaves are files. You can't
just limit the hiliteChanged event to leaves, so you have to be able to
determine if the user clicked on a leaf or a node, and if it's a node
behave differently than if it's a leaf.
Nodes can't have values in the tree view, so using numeric keys and setting
the values to the filenames and telling the user to ignore the keys won't
work because the subfolder name won't even appear in the tree view if you
do that. You could fake it by appending a fake key on the front of the
subfolder name, I suppose, but we're rapidly approaching "why not just use
a table field or dg" at that point, and I really don't want the key and the
value both appearing anyway.
In order to not have a key and a value appearing you have to set the keys
to the file (and subfolder) names. In that case, though, you don't know if
the user just clicked on a leaf or a node, unless you go back to the array
and inspect it.
More information about the use-livecode
mailing list