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,33defb6569eefe4c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!feeder.news-service.com!94.75.214.39.MISMATCH!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: response on OK button Date: Sat, 9 Jul 2011 14:14:42 +0200 Organization: cbb software GmbH Message-ID: References: <4e182fbc$0$2558$703f8584@news.kpn.nl> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: aKHTiZ/8UvMMEwlehtgVKQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news1.google.com comp.lang.ada:20157 Date: 2011-07-09T14:14:42+02:00 List-Id: On Sat, 9 Jul 2011 12:37:58 +0200, ldries46 wrote: > I created a dialog with an OK and a cancel button. > When I call the dialog using Run(dialog) only the quit button of the window > gives a response. The OK and the Cancel button do not even give any > response. I found this by using the Debug facility of GPS. > > What do I do wrong. 1. You didn't post the complete code 2. You were running GTK under the debugger, which might lead to unpredictable results. > I expected the buttons to react with giving the > gtk_response_OK or _Cancel value retuirned by Run As a general note, when adding buttons to the dialog you have to use Add_Button, which specifies the response for the button being added. If you don't do that, simply placing a button into the dialog as a container, you have to catch the signal emitted by the button and close the dialog manually from the handler. Either method works. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de