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,3ed4c57426e16006 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: GtkAda using Glade Date: Tue, 17 May 2011 21:14:44 -0400 Organization: The Wasteland Message-ID: References: <15ff2ec1-5a2b-4d24-8aab-cf7985b6374f@t19g2000yql.googlegroups.com> NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:19291 Date: 2011-05-17T21:14:44-04:00 List-Id: In article <15ff2ec1-5a2b-4d24-8aab-cf7985b6374f@t19g2000yql.googlegroups.com>, Gary wrote: > I am evaluating Ada for a GUI app using GtkAda/Glade. I have the > latest version of Ada from AdaCore. I've had no problem getting small > example apps to work with and without Glade. What I am having a > problem with is setting up signals through Glade. I simply want to > set up the "delete" event for the main window so "gtk_main_quit" will > be executed. Exactly how do I do that? I have many years of > programming experience with many languages, but I am fairly new to > Ada... although it should just be a matter of working with it a bit > to get comfortable with it. The same goes for GTK+. I have > experimented with it using C, FreePascal, and FreeBasic... so I am > familiar with the concept if not the practice. I'm just not clear on > how to set up signals with Glade. I know you use the properties panel > under the "signals" tab, but I don't know what to put in the various > fields. I'm afraid I haven't used Glade recently enough to offer detailed advice, but I recall studying the generated code when creating this example: In this tutorial, the window destroy callback shown in C and Pyhton, corresponds roughly to this line in procedure Init: Void_Cb.Connect (Win, "destroy", Void_Cb.To_Marshaller (Quit'Access)); Hope this helps. -- John B. Matthews trashgod at gmail dot com