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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.167.77 with SMTP id zm13mr19690591pab.27.1413842491740; Mon, 20 Oct 2014 15:01:31 -0700 (PDT) X-Received: by 10.140.20.175 with SMTP id 44mr476134qgj.4.1413842491477; Mon, 20 Oct 2014 15:01:31 -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!h18no8167073igc.0!news-out.google.com!u5ni8qab.1!nntp.google.com!w8no42103qac.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 20 Oct 2014 15:01:31 -0700 (PDT) In-Reply-To: <307b4479-1449-4de2-94ff-d960a140f198@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=108.44.225.195; posting-account=vk6_JwoAAABkMyHO1YfdP69Hm3CpbdGR NNTP-Posting-Host: 108.44.225.195 References: <307b4479-1449-4de2-94ff-d960a140f198@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Launching Popup Windows in Gnoga From: Jeremiah Injection-Date: Mon, 20 Oct 2014 22:01:31 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:22617 Date: 2014-10-20T15:01:31-07:00 List-Id: On Monday, October 20, 2014 11:22:12 AM UTC-4, David Botton wrote: > Also you will notice in Tutorial 6 that Launch now throws an exception if popups are blocked Gnoga.Gui.Window.Popup_Blocked Thanks for the update. I tried it out, but the popup portion seems to be hosing it. Even with popup blocking turned completely off, I still get the exception. On IE I get: Dispatch Error CONSTRAINT_ERROR - bad input for 'Value: "undefined" On FF I get: Dispatch Error GNOGA.GUI.WINDOW.POPUP_BLOCKED - gnoga-gui-window.adb:556 This is with the current version as of 5pm EST. The window still pops up, but the view isn't attached so it is an empty popup (in both IE and FF). This is my test code. It has some logic holes, but was just tossing some stuff up to test what you mentioned above ************************************************ with Gnoga.Application.Singleton; with Gnoga.Gui.Window; with Gnoga.Gui.View; with Gnoga.Gui.Base; with Gnoga.Gui.Element.Common; with Gnoga.Gui.Document; use type Gnoga.Gui.Document.Ready_State_Type; with Ada.Text_IO; use Ada.Text_IO; procedure Main is Main_Window : Gnoga.Gui.Window.Window_Type; Main_View : Gnoga.Gui.View.View_Type; Main_Button : Gnoga.Gui.Element.Common.Button_Type; Popup_View : Gnoga.Gui.View.View_Type; Popup_Button : Gnoga.Gui.Element.Common.Button_Type; procedure On_Popup_Button_Click( Obj : in out Gnoga.Gui.Base.Base_Type'Class) is begin Main_View.Put_Line("Popup Clicked!"); end On_Popup_Button_Click; procedure On_Main_Button_Click( Obj : in out Gnoga.Gui.Base.Base_Type'Class) is Popup_Window : Gnoga.Gui.Window.Window_Type; begin Main_View.Put_Line("Main Clicked!"); Popup_Window.Launch (Parent => Main_Window, URL => "", Width => 500, Height => 500, Left => 50, Top => 50, Location => False, Menu => False, Status => False, Tool_Bar => False, Title => False); while Popup_Window.Document.Ready_State /= Gnoga.Gui.Document.Complete or Popup_Window.Width = 0 loop delay 0.25; end loop; Popup_View.Create(Popup_Window); Popup_Button.Create(Popup_View,"Click Me Too!"); Popup_Button.On_Click_Handler(On_Popup_Button_Click'Unrestricted_Access); end On_Main_Button_Click; begin Gnoga.Application.Title("Hello World"); Put_Line("Hello World"); --Gnoga.Application.Open_URL_Windows; Gnoga.Application.Singleton.Initialize(Main_Window => Main_Window); Main_View.Create(Parent => Main_Window); Main_View.Put_Line("Hello World"); Main_Button.Create(Main_View,"Click Me"); Main_Button.On_Click_Handler(On_Main_Button_Click'Unrestricted_Access); Gnoga.Application.Singleton.Message_Loop; Put_Line("Application finished"); end Main;