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-Language: ENGLISH,ASCII X-Google-Thread: 103376,a4ee0d6fecf1a79a X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-05-06 03:40:58 PST Path: newsfeed.google.com!newsfeed.stanford.edu!news.tele.dk!129.240.148.23!uio.no!ntnu.no!randhol+abuse From: randhol+abuse@pvv.org (Preben Randhol) Newsgroups: comp.lang.ada Subject: Re: GtkAda and tasking how to?. Date: Sun, 6 May 2001 10:40:57 +0000 (UTC) Organization: Norwegian university of science and technology Message-ID: References: NNTP-Posting-Host: kiuk0156.chembio.ntnu.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: tyfon.itea.ntnu.no 989145657 6699 129.241.83.82 (6 May 2001 10:40:57 GMT) X-Complaints-To: usenet@itea.ntnu.no NNTP-Posting-Date: Sun, 6 May 2001 10:40:57 +0000 (UTC) User-Agent: slrn/0.9.7.0 (Linux) Xref: newsfeed.google.com comp.lang.ada:7226 Date: 2001-05-06T10:40:57+00:00 List-Id: On Sun, 6 May 2001 09:48:43 +0200, Per Sandbergs wrote: > Colud somone phelp me with the folowing issue concering GTKAda and tasking. > What i want to to is basiclty the folowing: > > Create a GUI in GtkAda containig a Text box.and som other widgets running as > the one Ada-task. > I am running > Win NT4/2K > GNAT 3.14a > GTKAda 1.3.11 I let my main program run a loop where all the checking it wants to do are done and then I run the GUI in a spereate task, so that when I need to update the GUI I call the Update_GUI below: task body GUI_task is begin Gtk.Main.Set_Locale; Gdk.Threads.Init; Gtk.Main.Init; loop select accept Update_GUI do -- Do the stuff here....... else -- If not do all the other things the GUI wants to do... while Gtk.Main.Events_Pending loop Dead := Gtk.Main.Main_Iteration; end loop; end select; delay 0.01; end loop; exception when E : others => Put_Line ("Exception raised in GUI task:" & Exception_Information (E)); end GUI_task; Hope it helps. -- Preben Randhol ------------------- http://www.pvv.org/~randhol/ -- �For me, Ada95 puts back the joy in programming.�