From: Jeremiah <jeremiah.breeden@gmail.com>
Subject: Re: Gnoga Latest Updates
Date: Mon, 13 Oct 2014 16:58:59 -0700 (PDT)
Date: 2014-10-13T16:58:59-07:00 [thread overview]
Message-ID: <2d0855ce-ab41-4326-9e88-928079a4e367@googlegroups.com> (raw)
In-Reply-To: <fdec1c53-0f8d-4a5d-b62b-3dc21da93c13@googlegroups.com>
On Monday, October 13, 2014 7:34:43 PM UTC-4, David Botton wrote:
> > I chose singleton because it fits what I need at a glance.
>
>
>
> No, better we improve Gnoga to make sure that Singleton at first glance does what is needed.
>
>
>
> > The main thing is if I close the browser window, then in my code Gnoga.Application.Singleton.Message_Loop still hangs as if it is waiting.
>
>
>
> Confirmed. You are right this should not be the case. On Destroy on the main window should do the job.
>
>
>
> I'll confirm in a bit. If it does or doesn't I will make some adjustments to handle this case and push the code to git in asap and repost.
>
>
>
> > I definitely will look at multiconnect for some projects I have, but I still want to make sure I have some applications for my coworkers to use in our lab (configure some devices). I just have to make sure they aren't having to do stuff at the command prompt if I can avoid it.
>
>
>
> It is important to me that Singleton does the job right :)
>
>
>
> Thanks for pointing this out back in a flash.
>
>
>
> David Botton
Thank you for taking a look at it. I did test Connection.Hold between my last post and reading your most recent. Hold did correctly release when the browser closed or changed page or reloaded. I did notice that my main program did not finish though (still required a control-C). My console output acted as if it would. I am guessing something is not finalizing correctly (probably due to my misuse of a component).
code:
with Gnoga.Gui.Window;
with Gnoga.Gui.View;
with Gnoga.Application.Multi_Connect;
with Gnoga.Types;
with Ada.Text_IO; use Ada.Text_IO;
procedure Main is
type App_Data is new Gnoga.Types.Connection_Data_Type with
record
My_View : Gnoga.Gui.View.View_Type;
end record;
type App_Access is access all App_Data;
procedure On_Connect
(Main_Window : in out Gnoga.Gui.Window.Window_Type'Class;
Connection : access Gnoga.Application.Multi_Connect.Connection_Holder_Type)
is
App : App_Access := new App_Data;
begin
Main_Window.Connection_Data (App.all);
App.My_View.Create (Main_Window);
Put_Line("Connection Started");
Connection.Hold;
Put_Line("Connection Finished");
Gnoga.Application.Multi_Connect.End_Application;
end On_Connect;
begin
Gnoga.Application.Title("Hello World");
Put_Line("Hello World");
Gnoga.Application.Multi_Connect.Initialize;
Gnoga.Application.Multi_Connect.On_Connect_Handler
(Event => On_Connect'Unrestricted_Access,
Path => "default");
Gnoga.Application.Multi_Connect.Message_Loop;
Put_Line("Application finished");
end Main;
Output:
C:\Users\Jere\Programming\ada\workspace\Test_Gnoga\exec\main
Hello World
Starting Web Server with web root at ../
Starting Gnoga Server on :8080
Connection Started
Connection Finished
Application finished
Even though the "Application finished" pops up, the application continues to run without exiting. This is based off the previous build I just realized, so I'll have to go back and update again to retest
next prev parent reply other threads:[~2014-10-13 23:58 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-12 3:49 Gnoga Latest Updates David Botton
2014-10-12 19:37 ` David Botton
2014-10-12 22:58 ` tonyg
2014-10-12 23:29 ` David Botton
2014-10-28 10:18 ` tonyg
2014-10-13 0:25 ` Jeffrey Carter
2014-10-13 0:12 ` David Botton
2014-10-13 6:05 ` David Botton
2014-10-13 16:22 ` jeremiah.breeden
2014-10-13 18:28 ` Simon Clubley
2014-10-13 21:12 ` David Botton
2014-10-13 21:20 ` David Botton
2014-10-13 23:29 ` Jeremiah
2014-10-13 23:34 ` David Botton
2014-10-13 23:58 ` Jeremiah [this message]
2014-10-14 2:38 ` David Botton
2014-10-14 2:45 ` David Botton
2014-10-14 0:06 ` David Botton
2014-10-14 0:24 ` David Botton
2014-10-14 2:26 ` David Botton
2014-10-15 2:01 ` Jeremiah
2014-10-15 3:49 ` David Botton
2014-10-14 23:52 ` David Botton
2014-10-15 0:30 ` David Botton
2014-10-15 15:54 ` David Botton
2014-10-19 4:40 ` David Botton
2014-10-19 12:59 ` David Botton
2014-10-19 21:36 ` Jeremiah
2014-10-19 22:01 ` David Botton
2014-10-19 23:02 ` David Botton
2014-10-20 0:42 ` Jeffrey Carter
2014-10-20 20:38 ` David Botton
2014-10-22 2:11 ` David Botton
2014-10-23 3:46 ` David Botton
2014-10-24 3:54 ` David Botton
2014-10-26 4:22 ` David Botton
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox