From: Jeremiah <jeremiah.breeden@gmail.com>
Subject: Re: Launching Popup Windows in Gnoga
Date: Mon, 20 Oct 2014 16:07:16 -0700 (PDT)
Date: 2014-10-20T16:07:16-07:00 [thread overview]
Message-ID: <aa609f88-177f-46b4-b303-2ab939e634b9@googlegroups.com> (raw)
In-Reply-To: <9ebb7994-aaf1-4eec-a335-bd72ff0acd6b@googlegroups.com>
On Monday, October 20, 2014 6:30:12 PM UTC-4, David Botton wrote:
> Your issue is not with popups, but an Ada issue.
>
>
>
> Popup_Window will finalize at the end of the procedure On_Main_Button_Click, even though the popup will remain on the screen, reference to it has disappeared both in Gnoga and on the browser.
>
>
>
> Try this instead:
>
>
>
> procedure On_Main_Button_Click( Obj : in out Gnoga.Gui.Base.Base_Type'Class) is
>
> Popup_Window : Gnoga.Gui.Window.Window_Access :=
>
> new Gnoga.Gui.Window.Window_Type;
>
> begin
Even with that change, the issue I mentioned above exists (The Constraint error on IE and the popup blocked exception on FF).
However, my original post was kinda touching on your response. I definitely want to avoid memory leaks if possible (I can work around this similar to your second solution). However, I also need to handle the user clicking on the button multiple times. I definitely can't hold onto the reference and relaunch the window the next time the button is pressed (at least if I understand your response to the relaunch question correctly). Doing the close/free and allocating a new one gets around that for the window itself, but I don't know if that has implications on my view object if it is shared amongst multiple window objects.
As another thought, I'm also still not 100% sure if I would have a race condition or synchronization issue if the button was pressed twice (2 popups at the same time). I know when I program GUI's in windows exactly what thread the actions happen in. In Gnoga, I'm still looking through to determine if each on on_click is executed in separate threads/tasks or the same as the Main(). I thought about disabling the button to prevent two popups at once, but I wouldn't have an event to remove the disable with later on (especially if they opted to simply close the popup window without clicking my buttons).
next prev parent reply other threads:[~2014-10-20 23:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-20 12:56 Launching Popup Windows in Gnoga Jeremiah
2014-10-20 13:38 ` David Botton
2014-10-20 15:22 ` David Botton
2014-10-20 22:01 ` Jeremiah
2014-10-20 22:30 ` David Botton
2014-10-20 23:07 ` Jeremiah [this message]
2014-10-21 0:21 ` David Botton
2014-10-21 0:27 ` David Botton
2014-10-21 1:27 ` David Botton
2014-10-21 2:06 ` jeremiah.breeden
2014-10-21 11:24 ` David Botton
2014-10-22 1:56 ` Jeremiah
2014-10-22 2:09 ` David Botton
2014-10-22 2:57 ` Jeremiah
2014-10-22 15:24 ` David Botton
2014-10-21 2:03 ` Jeremiah
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox