You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to incorporate a TreeWidget in my app, and I'm running into a problem where newChild() doesn't work if I use it in a button's click delegate. My code is more or less like this:
//note: i registered TreeWidget in DML manually
aTree= mainWindow.mainWidget.childById!TreeWidget("aTree");
aButton= mainWindow.mainWidget.childById!Button("aButton");
//this stuff works
TreeItem tree1 = aTree.items.newChild("group1", "Group 1"d, "document-open");
aTree.items.newChild("group2", "Group 1"d, "document-open");
tree1.newChild("g1_1", "Group 1 item"d);
aButton.click = delegate(Widget w) {
//doesn't work, but is for sure being ran
aTree.items.newChild("someid", "Some text"d);
return true;
};
I assume this is a bug, but of course it could just be me doing something wrong. Thanks again!
The text was updated successfully, but these errors were encountered:
I'm trying to incorporate a TreeWidget in my app, and I'm running into a problem where
newChild()doesn't work if I use it in a button's click delegate. My code is more or less like this:I assume this is a bug, but of course it could just be me doing something wrong. Thanks again!
The text was updated successfully, but these errors were encountered: