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-7-bit X-Google-Thread: 103376,a7bbea44913cfde8,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-24 08:01:54 PST Path: newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cpk-news-hub1.bbnplanet.com!news.gtei.net!news-FFM2.ecrc.net!news.cesnet.cz!crax.cesnet.cz!news.felk.cvut.cz!not-for-mail From: Tomas Hlavaty Newsgroups: comp.lang.ada Subject: Tasking with GtkAda Date: Mon, 23 Apr 2001 10:10:48 +0200 Organization: Czech Technical University Message-ID: <3AE3E388.7E396BD0@labe.felk.cvut.cz> NNTP-Posting-Host: bela.felk.cvut.cz Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ns.felk.cvut.cz 988013323 78957 147.32.85.107 (23 Apr 2001 08:08:43 GMT) X-Complaints-To: usenet@ns.felk.cvut.cz NNTP-Posting-Date: Mon, 23 Apr 2001 08:08:43 +0000 (UTC) X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.14-5.0 i686) X-Accept-Language: cs, en Xref: newsfeed.google.com comp.lang.ada:6887 Date: 2001-04-23T10:10:48+02:00 List-Id: Hi all, I'm looking for more complicated examples of tasking with GtkAda than the one in the GtkAda UG. Could you help me? I need to design a distributed application with Glade. Clients should have GtkAda GUI, but I don't know, how to pass data from server to a GtkAda widget. I created very simple distributed application with Glade. Server counts queries of clients and both, server and client display the number of current query to stdout. I would like to make the client, which displays the query number in GtkAda widget (e.g. Gtk.Label). -------------- example --------------------- -- types.ads package Types is pragma Pure; type Customer_T is new String; end Types; -- server.ads with Types; use Types; package Server is pragma Remote_Call_Interface; function Get_Counter (Customer: in Customer_T) return Positive; end Server; -- server.adb with Text_Io; use Text_Io; package body Server is Counter: Positive := Positive'First; function Get_Counter (Customer: in Customer_T) return Positive is begin Put_Line (Counter'Img); Counter := Counter + 1; return Counter; end Get_Counter; end Server; -- manager.adb with Text_Io; use Text_Io; with Server; use Server; procedure Manager is begin loop Put_Line ("."); delay 1.0; end loop; end Manager; -- client.adb with Text_Io; use Text_Io; with Types; use Types; with Server; use Server; procedure Client is Customer: Customer_T := "client"; begin loop Put_Line (Get_Counter (Customer)'Img); delay 1.0; end loop; end Client; -- simcity.cfg configuration Simcity is pragma Version (False); pragma Starter (None); pragma Boot_Location ("tcp", "localhost:5558"); Server_Partition: Partition := (Server); procedure Manager is in Server_Partition; procedure Client; Client_Partition: Partition; for Client_Partition'Termination use Local_Termination; for Client_Partition'Main use Client; end Simcity; ------------- end of example ----------------- Thanks, Tomas