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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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!dr5g2000vbb.googlegroups.com!not-for-mail From: tonyg Newsgroups: comp.lang.ada Subject: Re: gtkada and timeouts Date: Fri, 1 Apr 2011 02:53:58 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <76005a0b-51c6-46c3-9cd3-976d7d7a050e@dr5g2000vbb.googlegroups.com> <02b5da0a-b640-4b44-bdb5-026acf923e00@32g2000vbe.googlegroups.com> NNTP-Posting-Host: 82.46.232.121 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1301651638 27807 127.0.0.1 (1 Apr 2011 09:53:58 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 1 Apr 2011 09:53:58 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: dr5g2000vbb.googlegroups.com; posting-host=82.46.232.121; posting-account=28F2IwkAAACL1Z5nRC-dE7zuvWdbWC7P User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.2.16) Gecko/20110323 Ubuntu/10.04 (lucid) Firefox/3.6.16,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19627 Date: 2011-04-01T02:53:58-07:00 List-Id: On Apr 1, 10:15=A0am, tonyg wrote: > On Apr 1, 9:27=A0am, "Dmitry A. Kazakov" > wrote: > > > > > On Fri, 1 Apr 2011 01:09:36 -0700 (PDT), 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 modifie= d > > > 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_Acce= ss); > > > > 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= ? > > > The procedure Gtk.Main.Main runs infinite messages loop. You should add > > timers before entering the loop. > > > -- > > Regards, > > Dmitry A. Kazakovhttp://www.dmitry-kazakov.de > > I tried placing it just before the Gtk.Main.Main and the whole app > locked up. I'm going to put it now in the initialise procedure than > gate creates in the _pkg.adb. Thanks Guys, that bits working now and I have moved on to my next self inflicted bug ! :)