From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3f907d2172f83c8f X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!e8g2000vbz.googlegroups.com!not-for-mail From: Julian Leyh Newsgroups: comp.lang.ada Subject: Re: gtkada and timeouts Date: Fri, 1 Apr 2011 01:50:59 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <76005a0b-51c6-46c3-9cd3-976d7d7a050e@dr5g2000vbb.googlegroups.com> NNTP-Posting-Host: 194.156.172.86 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1301647859 22881 127.0.0.1 (1 Apr 2011 08:50:59 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 1 Apr 2011 08:50:59 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e8g2000vbz.googlegroups.com; posting-host=194.156.172.86; posting-account=4IMjSwoAAABghF4GBOy5ozdaZM8EkGwR User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.204 Safari/534.16,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19625 Date: 2011-04-01T01:50:59-07:00 List-Id: On 1 Apr., 10:09, tonyg wrote: > I've written a function called update_screen which always returns a > value of true and sets various values in the 'main_screen' access > record. This is part of the code from glade/gate which I have modified > to include a timeout > > with Gtk; use Gtk; > with Gtk; use Gtk; > with Gtk.Main; use Gtk.Main; > with Gtk.Widget; use Gtk.Widget; > with Main_Screen_Pkg; use Main_Screen_Pkg; > with Main_Control; use Main_Control; > procedure Main_Screen is > =A0 =A0Main_Screen : Main_Screen_Access; > =A0 =A0 =A0 =A0 Timeout_Id : Timeout_Handler_id ; > =A0 =A0package Data_Timeout is new Gtk.Main.Timeout (Main_Screen_Access); > > begin > =A0 =A0Gtk.Main.Set_Locale; > =A0 =A0Gtk.Main.Init; > =A0 =A0Gtk_New (Main_Screen); > =A0 =A0Show_All (Main_Screen); > =A0 =A0Gtk.Main.Main; > =A0 =A0-- my addition -- the timer > =A0 =A0Timeout_Id :=3D Data_Timeout.Add (100, Update_Screen'Access, > Main_Screen); > > end Main_Screen; > > Sadly the timeout is never called, Can anyone cast some light on this? Gtk.Main.Main never returns.