[gtkada] Tasking with GtkAda for newbies
Preben Randhol
randhol at pvv.org
Thu Feb 8 21:39:32 CET 2001
Preben Randhol <randhol at pvv.org> wrote on 08/02/2001 (15:29) :
I found out that this works:
task body GUI_Task is
begin
Gtk.Main.Set_Locale;
Gdk.Threads.Init;
Gtk.Main.Init;
loop
select
accept New_Dialog do
Gtk_New (Notify_Dialog,
"Remember to tape the radioplay today")
Show_All (Notify_Dialog);
end New_Dialog;
else
while Gtk.Main.Events_Pending loop
Dead := Gtk.Main.Main_Iteration;
end loop;
end select;
delay 0.01;
end loop;
The problem was that when I tried this earlier I had :
accept New_Dialog do
Gdk.Threads.Enter;
Gtk_New (Notify_Dialog,
"Remember to tape the radioplay today")
Show_All (Notify_Dialog);
Gdk.Threads.Leave;
end New_Dialog;
Which didn't work.
My next question is: Do I need to Free Notify_Dialog with
Unchecked_Deallocation when I destroy the dialog window?
Thanks in advance.
--
Preben Randhol ------------------- http://www.pvv.org/~randhol/ --
«For me, Ada95 puts back the joy in programming.»
More information about the gtkada
mailing list