I have the following problem, which I can solve in my case but I still
want to know how to solve in a general way.
Case:
In an Ada program I use the Gtk Filechooser with the On_OK routine. In
that routine I read the chosen file and start some other calculations
I need to do on that file (call for a new dialogue witin a callback
from a higher level). But these calculations are depending on the
extension of the file. In some cases I even need another dialogue to
decide which type o f calculations I have to follow. The program can
only go on after this manual choice is made. But I see that the
program goes on without waiting on that last dialogue to be closed.
Is there a way in Gtk to solve this or in Ada to block that obvious
parallel processing or must I look for a solution within the operating
system (Windows 11)
ldries46 <bertus.dries@planet.nl> writes:
I have the following problem, which I can solve in my case but I stillI'm not sure what goes on "in parallel". Have you started any tasks in
want to know how to solve in a general way.
Case:
In an Ada program I use the Gtk Filechooser with the On_OK routine. In
that routine I read the chosen file and start some other calculations
I need to do on that file (call for a new dialogue witin a callback
from a higher level). But these calculations are depending on the
extension of the file. In some cases I even need another dialogue to
decide which type o f calculations I have to follow. The program can
only go on after this manual choice is made. But I see that the
program goes on without waiting on that last dialogue to be closed.
Is there a way in Gtk to solve this or in Ada to block that obvious
parallel processing or must I look for a solution within the operating
system (Windows 11)
your Ada program?
If you want a modal dialog, you run it with Gtk.Dialog.Run, which starts
a nested event loop and does not process inputs in any other parts of
the GUI until the user closes this dialog causing Run to return. Of
course, since you've read the documentation on Gtk.Dialog, I assume this
is how you open your dialog. So, what is your problem exactly?
I have started my dialog with de show_all function. In this case the
radio buttons and OK button do work correctly with show they did not
work and with run they did not even appear in the dialog. I understand
in the mean time that show and show all makes the program not stopping
until the the dialog is completed and run stops the further running of
the program until the dialog is stopped. Now I just need the run
equivalent of show_all
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 379 |
Nodes: | 16 (2 / 14) |
Uptime: | 44:31:38 |
Calls: | 8,141 |
Calls today: | 4 |
Files: | 13,085 |
Messages: | 5,858,054 |