Re: problem extracting data from GtkSourceView using Gtkd

2019-01-17 Thread Chris Bare via Digitalmars-d-learn
I think I finally figured it out. I think the GTKapplication shutdown signal is called after the window has been destroyed. If I attach a handler to the window's destroy signal, then I am able to get the data from the sourceView.

Re: problem extracting data from GtkSourceView using Gtkd

2019-01-17 Thread Mike Wey via Digitalmars-d-learn
On 17-01-2019 00:31, Chris Bare wrote: Are the widgets destroyed before onShutdown? The onShutdown callback is run after the GTK main loop terminates, so most objects would be finalized. -- Mike Wey

Re: problem extracting data from GtkSourceView using Gtkd

2019-01-16 Thread Chris Bare via Digitalmars-d-learn
Weird, the code does work in my program during startup, but when I call the same function from Application.onShutdown it gets the 0 results. Are the widgets destroyed before onShutdown? Here's a stripped down version my Application subclass: int main (string[] args) { auto applicatio

Re: problem extracting data from GtkSourceView using Gtkd

2019-01-15 Thread Mike Wey via Digitalmars-d-learn
On 14-01-2019 23:52, Chris Bare wrote: I would have posted this in the Gtkd forum, but it has been down for a while. I'm porting a GTK2/C program to Gtkd. I'm trying to read the data from a GtkSourceView, but when I try to get the bounds, it's always zero. Here's the c version that works:  

Re: problem extracting data from GtkSourceView using Gtkd

2019-01-14 Thread Neia Neutuladh via Digitalmars-d-learn
On Mon, 14 Jan 2019 22:52:48 +, Chris Bare wrote: > auto start = new TextIter(); > auto end = new TextIter(); You shouldn't need to new these. `out` means that the function is going to overwrite the variables. Other than that, I'm not sure.

problem extracting data from GtkSourceView using Gtkd

2019-01-14 Thread Chris Bare via Digitalmars-d-learn
I would have posted this in the Gtkd forum, but it has been down for a while. I'm porting a GTK2/C program to Gtkd. I'm trying to read the data from a GtkSourceView, but when I try to get the bounds, it's always zero. Here's the c version that works: GtkSourceBuffer *bf; GtkT