Tree List

Brian O'Sullivan brian.os at verizon.net
Sat Mar 18 15:46:22 EDT 2017


I concur with JM’s advice. Trees are different from other list-based GUI objects. We’re used to plain lists, headed lists, complex grids, where user click on a line sets the current line, etc. But the nodes of a tree are completely independent of any list used to build them. As programmers we have several options to establish that link, and JM’s recommendation to use the node id property works very well if you have numeric-based key values. 

In the tree $event method you can get a reference to the current clicked-on node via $cfield.$currentnode(), and then use that item reference to access the $nodeid, $tag, or other properties of the node.

On evClick
	set nodeRef to $cfield.$currentnode()
	Calculate id as nodeRef.$ident
	Do myList.$search($ref.keyField = id,ktrue,kfalse,kfalse,kfalse)

regards
-brian o’sullivan; bear, de



More information about the omnisdev-en mailing list