Tree List

David Barnett David at FairLibertysCall.com
Sat Mar 18 20:45:18 EDT 2017


Yup. DON'T think of it as a tree list, but as a tree window widget. Yes, a list is one way to configure a list, but the list does not stay associated with the tree. And yup, the tree node id is one (good) way to link the tree to the outside world.

DAVID

David Barnett
David at FairLibertysCall.com
c: 516-398-8668

> On Mar 18, 2017, at 3:46 PM, Brian O'Sullivan <brian.os at verizon.net> wrote:
> 
> 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
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com



More information about the omnisdev-en mailing list