var tableData = ... var listData = ... var textData = ...
and then add callback methods (all in the same source file?). But that runs out of hand real quick. It seems much nicer and cleaner to have a treeView object that knows it's own data and callback methods.
What if you have nested elements, like a window with those three elements, or something else. How would you hand that data around?
I have seen the make-struct macro of MzScheme, but once you start using inheritance with that, it starts getting really ugly, imo.