Open davidberneda opened 9 years ago
It is currently possible to create a Tree of dictionary nodes, for example:
uses System.Generic.Collections; type TMyTree = TNode<TDictionary<String, TButton>>;
In this way, each node "Data" property is a TDictionary that can be used as normal.
However, this is different than having a Tree structure where the children nodes are unique, and accessible using the desired "Key", for example.
type TMyTree = TNodeDictionary<String, Integer>; var Root : TMyTree; ... Root['America'].Data := 123; Root['America']['USA'].Data := 456;
In the above code, "USA" is a unique children node of "America", and each node has a "Data" property of type Integer.
A nice idea idea, now it looks like a JSON object :smile:
Can we also do Root['America']['USA']['3rdLevel'].Data := 456; ?
Root['America']['USA']['3rdLevel'].Data := 456;
It is currently possible to create a Tree of dictionary nodes, for example:
In this way, each node "Data" property is a TDictionary that can be used as normal.
However, this is different than having a Tree structure where the children nodes are unique, and accessible using the desired "Key", for example.
In the above code, "USA" is a unique children node of "America", and each node has a "Data" property of type Integer.