GTKD TreeView - Delete TreeView SubItem with Button?

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


On Fri, 20 Nov 2015 19:45:25 +0000, TheDGuy wrote:

> So like this?
> 
> 	public void remove(TreeIter iter)
> 	{
> 		this.remove(iter);
> 	}
> 
> If i do this, i get a stackoverflow error :(

That's creating an infinite recursion as the method simply calls itself.
Assuming the class inherits from ListStore, you can just erase the remove 
method entirely and let the base class handle it.  If you want to do 
something extra, use:

override void remove(TreeIter iter)
{
	// Anything custom
	super.remove(iter);
	// Anything custom
}


More information about the Digitalmars-d-learn mailing list