"Extra" object for tree view nodes?
BlitzMax Forums/BlitzMax Programming/"Extra" object for tree view nodes?
| ||
Since tree view nodes are TGadgets rather than TGadgetItems, is it really the best way to associate an arbitrary object with a tree view node to use a TMap? That has problems when you want to free the gadget, anyway, the TMap reference still exists so it won't be garbage collected. It seems like it would be useful to have an "extra:Object" field in TGadget aswell. Or am I overlooking something? |
| ||
There is something called a context of type TObject. See my tutorial Tutorial 18: The Treeview Gadget - Part 1 where I use the context object to store the fullpath of the filename. This could fit your bill. |
| ||
Aha! That's only used for filtered text entry gadgets, yes? Good find. |