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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.50.98.74 with SMTP id eg10mr15228521igb.0.1413818531738; Mon, 20 Oct 2014 08:22:11 -0700 (PDT) X-Received: by 10.140.39.85 with SMTP id u79mr15188qgu.16.1413818531594; Mon, 20 Oct 2014 08:22:11 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!uq10no14314840igb.0!news-out.google.com!i10ni95qaf.0!nntp.google.com!s7no4051056qap.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 20 Oct 2014 08:22:11 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.176.73.77; posting-account=yiWntAoAAAC1KqC_shmxJYv07B9l6LNU NNTP-Posting-Host: 66.176.73.77 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <307b4479-1449-4de2-94ff-d960a140f198@googlegroups.com> Subject: Re: Launching Popup Windows in Gnoga From: David Botton Injection-Date: Mon, 20 Oct 2014 15:22:11 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:22610 Date: 2014-10-20T08:22:11-07:00 List-Id: I have pushed in to git changes to tutorial 6 that show how to more gracefully handle waiting for a popup. It is not really possible to set an event on the popup since doing so would end up in a race condition in most situations. Also there is no "standard" between browsers to handle it properly. In a multi_connect app if the popup is also a gnoga window it would be trivial to just have the two sync up in pure Ada using tasks or POs. For the Singleton the following insures that you can both access the contents and also that the window has been created and displayed by the browser: while App.My_Popup2.Document.Ready_State /= Gnoga.Gui.Document.Complete or App.My_Popup2.Width = 0 loop delay 0.25; end loop; Also you will notice in Tutorial 6 that Launch now throws an exception if popups are blocked Gnoga.Gui.Window.Popup_Blocked David Botton