From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a37:6253:: with SMTP id w80mr3636273qkb.237.1631109134075; Wed, 08 Sep 2021 06:52:14 -0700 (PDT) X-Received: by 2002:a25:2ccf:: with SMTP id s198mr4876593ybs.452.1631109133889; Wed, 08 Sep 2021 06:52:13 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!panix!4.us.feeder.erje.net!feeder.erje.net!news.misty.com!border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 8 Sep 2021 06:52:13 -0700 (PDT) Injection-Info: google-groups.googlegroups.com; posting-host=94.31.101.123; posting-account=rmHyLAoAAADSQmMWJF0a_815Fdd96RDf NNTP-Posting-Host: 94.31.101.123 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <296e83e5-5855-4732-94ba-ed9c05f3dd6dn@googlegroups.com> Subject: Gtk.Message_Dialog From: AdaMagica Injection-Date: Wed, 08 Sep 2021 13:52:14 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62672 List-Id: I need a two page message for a help button, so I have the callback procedure Help (Self: access Gtk.Button.Gtk_Button_Record'Class) is begin Show ("Page 1"); Show ("Page 2"); end Help; where procedure Show (Message: Glib.UTF8_String) is Dialog : Gtk.Message_Dialog.Gtk_Message_Dialog; Response: Gtk.Dialog.Gtk_Response_Type; begin Gtk.Message_Dialog.Gtk_New (Dialog, Parent =3D> Parent, Flags =3D> Modal, The_Type =3D> Message_Info, Buttons =3D> Buttons_Close, Message =3D> Message); Response :=3D Gtk.Message_Dialog.Run (Dialog); Gtk.Message_Dialog.Close (Dialog); end Show; The problem is: When the first dialog's Close button is pressed, the next p= age appears, but the first is not closed. When the second page's Close is p= ressed, the window disappers, but the first dialog window is still there. O= nly pressing the red cross on the window's right upper edge closes the dial= og. What's wrong with my code?