GTKD TreeView - Delete TreeView SubItem with Button?

Justin Whear via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Nov 20 11:21:46 PST 2015


On Fri, 20 Nov 2015 18:57:10 +0000, TheDGuy wrote:

> Thanks for your reply,
> 
> now it gets more clear for me but how am i able to access the TreeView
> within the CustomButton-Class? If i declare TreeView and TreeStore
> public i get "static variable list cannot be read at compile time"?
> 
> auto list = new List();
> auto treeView = new LanguageTree(list);

You need to declare them at the module scope but initialize them inside 
your main function, so:

List list;
LanguageTree treeView;

then inside your main function:

list = new List();
treeView = new LanguageTree(list);


More information about the Digitalmars-d-learn mailing list