Re: GTKD TreeView - Delete TreeView SubItem with Button?

2015-11-20 Thread Michael Robertson via Digitalmars-d-learn
On Friday, 20 November 2015 at 17:09:50 UTC, TheDGuy wrote: Hello, is it possible, to delete a selected TreeView SubItem with a Button-Click? My Code currently looks like this: import gtk.MainWindow; import gtk.Box; import gtk.Main; import gtk.Button; import gdk.Event; import gtk.Widget;

GTKD TreeView - Delete TreeView SubItem with Button?

2015-11-20 Thread TheDGuy via Digitalmars-d-learn
Hello, is it possible, to delete a selected TreeView SubItem with a Button-Click? My Code currently looks like this: import gtk.MainWindow; import gtk.Box; import gtk.Main; import gtk.Button; import gdk.Event; import gtk.Widget; import List, Languages; void main(string[] args){

Re: GTKD TreeView - Delete TreeView SubItem with Button?

2015-11-20 Thread Michael Robertson via Digitalmars-d-learn
On Friday, 20 November 2015 at 19:45:26 UTC, TheDGuy wrote: So like this? public void remove(TreeIter iter) { this.remove(iter); } If i do this, i get a stackoverflow error :( Your List inherits from TreeStore correct? just get rid of your custom

Re: GTKD TreeView - Delete TreeView SubItem with Button?

2015-11-20 Thread Justin Whear via Digitalmars-d-learn
On Fri, 20 Nov 2015 18:57:10 +, 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"? > >

Re: GTKD TreeView - Delete TreeView SubItem with Button?

2015-11-20 Thread TheDGuy via Digitalmars-d-learn
Ahh, okay. Thank you very much for your help, now everything works fine :)

Re: GTKD TreeView - Delete TreeView SubItem with Button?

2015-11-20 Thread TheDGuy via Digitalmars-d-learn
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"? import gtk.MainWindow; import gtk.Box; import gtk.Main;

Re: GTKD TreeView - Delete TreeView SubItem with Button?

2015-11-20 Thread TheDGuy via Digitalmars-d-learn
Thanks for your reply, is it also possible to do it like this? import gtk.MainWindow; import gtk.Box; import gtk.Main; import gtk.Button; import gdk.Event; import gtk.Widget; import List, Languages; void main(string[] args){ Main.init(args); MainWindow win = new

Re: GTKD TreeView - Delete TreeView SubItem with Button?

2015-11-20 Thread Justin Whear via Digitalmars-d-learn
On Fri, 20 Nov 2015 19:34:01 +, TheDGuy wrote: > Thanks for your reply, > > is it also possible to do it like this? > Yeah, that'll work. > but now i get the error: > > "rowDeleted is not callable using argument types (TreeIter)"? rowDeleted is just to emit the signal that a row has

Re: GTKD TreeView - Delete TreeView SubItem with Button?

2015-11-20 Thread TheDGuy via Digitalmars-d-learn
So like this? public void remove(TreeIter iter) { this.remove(iter); } If i do this, i get a stackoverflow error :(

Re: GTKD TreeView - Delete TreeView SubItem with Button?

2015-11-20 Thread Justin Whear via Digitalmars-d-learn
On Fri, 20 Nov 2015 19:45:25 +, 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.