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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC 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-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!news.weisnix.org!newsfeed.ision.net!newsfeed2.easynews.net!ision!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: gtkada and timeouts Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <76005a0b-51c6-46c3-9cd3-976d7d7a050e@dr5g2000vbb.googlegroups.com> Date: Fri, 1 Apr 2011 10:27:35 +0200 Message-ID: NNTP-Posting-Date: 01 Apr 2011 10:27:33 CEST NNTP-Posting-Host: ec3bfe54.newsspool4.arcor-online.net X-Trace: DXC=;7\=W4nIOeAWDmlTRbh@=I4IUKQI 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 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 > Main_Screen : Main_Screen_Access; > Timeout_Id : Timeout_Handler_id ; > package Data_Timeout is new Gtk.Main.Timeout (Main_Screen_Access); > > begin > Gtk.Main.Set_Locale; > Gtk.Main.Init; > Gtk_New (Main_Screen); > Show_All (Main_Screen); > Gtk.Main.Main; > -- my addition -- the timer > Timeout_Id := 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. Kazakov http://www.dmitry-kazakov.de