comp.lang.ada
 help / color / mirror / Atom feed
* Gnoga Latest Updates
@ 2014-10-12  3:49 David Botton
  2014-10-12 19:37 ` David Botton
                   ` (6 more replies)
  0 siblings, 7 replies; 36+ messages in thread
From: David Botton @ 2014-10-12  3:49 UTC (permalink / raw)


Added an additional "plugin" jQuery

You can now easily create jQuery queries and execute methods on the query using Gnoga.Gui.Plugin.jQuery

This allows for things like, turn every DIV on a page azure blue:

      Query.jQuery (Main_Window.Connection_ID, """div""");
      Query.Execute ("css('background-color','azure')");



A Note about directory structure in Gnoga:

Gnoga.Gui - All client side gui related code
Gnoga.Gui.Plugin - Bindings to client side 3rd party JavaScript libraries (jQuery, Ace Editor)
Gnoga.Gui.Module - Future space for non-core or 3rd part Gnoga Gui code

Gnoga.Types - Types

Gnoga.Server - All server side Gnoga code (like database access, connectivity, etc.)
Gnoga.Client - All client side Gnoga code  (browser persistent data, etc.)

Gnoga.Application - Code for creating various types of Gnoga applications (Singleton, Multiconnect)

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  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-13  0:12 ` David Botton
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-12 19:37 UTC (permalink / raw)


Gnoga.Gui.Element.Table

Table support


While the "design community" supposedly has dropped the use of tables for layout of html, it is still the only way to accomplish many things. Tables in Gnoga are views and each cell is a view, this enables using tables for data display or layout as desired.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-12 19:37 ` David Botton
@ 2014-10-12 22:58   ` tonyg
  2014-10-12 23:29     ` David Botton
  2014-10-13  0:25     ` Jeffrey Carter
  0 siblings, 2 replies; 36+ messages in thread
From: tonyg @ 2014-10-12 22:58 UTC (permalink / raw)


David, I update information on a screen from a protected object in my ada app.

I am wondering if it is possible to regularly update information on the gnoga gui so to push it from the protected object to the screen regularly? what do you think?

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  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
  1 sibling, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-12 23:29 UTC (permalink / raw)


> I am wondering if it is possible to regularly update information on the gnoga gui so to push it from the protected object to the screen regularly? what do you think?

Take a look at /test/multiuser.adb there is an example of using tasks with Gnoga.

David Botton

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-12  3:49 Gnoga Latest Updates David Botton
  2014-10-12 19:37 ` David Botton
@ 2014-10-13  0:12 ` David Botton
  2014-10-13  6:05   ` David Botton
  2014-10-13 16:22 ` jeremiah.breeden
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-13  0:12 UTC (permalink / raw)


Added Tutorial-08 - Forms, Custom Widgets and Dynamic Elements

I changed Window_Type.Connection_Data to accept an access type (which is usually the case anyways) that will likely require a small change to almost any project anyone has written to date.

Also, now if a view is added to a Window_Type and it is marked Dynamic it will be deallocated on finalization of the Window_Type.

The next tutorial will demonstrate working with forms interactively.

David Botton


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-12 22:58   ` tonyg
  2014-10-12 23:29     ` David Botton
@ 2014-10-13  0:25     ` Jeffrey Carter
  1 sibling, 0 replies; 36+ messages in thread
From: Jeffrey Carter @ 2014-10-13  0:25 UTC (permalink / raw)


On 10/12/2014 03:58 PM, tonyg wrote:
> David, I update information on a screen from a protected object in my ada
> app.
> 
> I am wondering if it is possible to regularly update information on the gnoga
> gui so to push it from the protected object to the screen regularly? what do
> you think?

That's what tasks are for.

-- 
Jeff Carter
"Many times we're given rhymes that are quite unsingable."
Monty Python and the Holy Grail
57


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-13  0:12 ` David Botton
@ 2014-10-13  6:05   ` David Botton
  0 siblings, 0 replies; 36+ messages in thread
From: David Botton @ 2014-10-13  6:05 UTC (permalink / raw)


Tutorial 09 Added

learn about:

1) Interactive Forms
2) Tabs and the Card View
3) Using the Docker view for layout



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-12  3:49 Gnoga Latest Updates David Botton
  2014-10-12 19:37 ` David Botton
  2014-10-13  0:12 ` David Botton
@ 2014-10-13 16:22 ` jeremiah.breeden
  2014-10-13 18:28   ` Simon Clubley
  2014-10-14 23:52 ` David Botton
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 36+ messages in thread
From: jeremiah.breeden @ 2014-10-13 16:22 UTC (permalink / raw)


On Saturday, October 11, 2014 11:49:29 PM UTC-4, David Botton wrote:
> Added an additional "plugin" jQuery
> 
> 
> 
> You can now easily create jQuery queries and execute methods on the query using Gnoga.Gui.Plugin.jQuery
> 
> 
> 
> This allows for things like, turn every DIV on a page azure blue:
> 
> 
> 
>       Query.jQuery (Main_Window.Connection_ID, """div""");
> 
>       Query.Execute ("css('background-color','azure')");
> 
> 
> 
> 
> 
> 
> 
> A Note about directory structure in Gnoga:
> 
> 
> 
> Gnoga.Gui - All client side gui related code
> 
> Gnoga.Gui.Plugin - Bindings to client side 3rd party JavaScript libraries (jQuery, Ace Editor)
> 
> Gnoga.Gui.Module - Future space for non-core or 3rd part Gnoga Gui code
> 
> 
> 
> Gnoga.Types - Types
> 
> 
> 
> Gnoga.Server - All server side Gnoga code (like database access, connectivity, etc.)
> 
> Gnoga.Client - All client side Gnoga code  (browser persistent data, etc.)
> 
> 
> 
> Gnoga.Application - Code for creating various types of Gnoga applications (Singleton, Multiconnect)

Question:  Is there currently or will there be a way to tell when the user closes the browser window or navigates to a different URL?  

I am using Tutorial 2 as base example for this, but when a user does the following:

Starts Tutorial 2
Opens localhost:8080
closes the browser
Reopens localhost:8080

they get the error message:  Only one connection permitted.

I was hoping to catch the event for leaving the current browsing session, so I could terminate the current singleton, and then just start a new one so a fresh browsing session can be used mostly seamlessly.  Or alternately, just close out the program completely.

The reason for this is I am going to setup an applicationfor my users by automating the process of both starting the application and opening the browser (using the method you provide in the application package).  They aren't programmer types so they aren't going to want to have to control-C out of the application in a command shell each time they forget to click my "exit" button and instead close the browser.

I tried the On_Abort event, but it doesn't seem to call when the browser closes or you navigate to a different URL.  Is there something I can do.  I want this to be as seamless for my users as possible.

As a note, I know that Gnoga isn't officially released yet.  I am just in the planning stages, but wanted to bring this up early.


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-13 16:22 ` jeremiah.breeden
@ 2014-10-13 18:28   ` Simon Clubley
  2014-10-13 21:12     ` David Botton
  0 siblings, 1 reply; 36+ messages in thread
From: Simon Clubley @ 2014-10-13 18:28 UTC (permalink / raw)


On 2014-10-13, jeremiah.breeden@gmail.com <jeremiah.breeden@gmail.com> wrote:
>
> Question: Is there currently or will there be a way to tell when the
> user closes the browser window or navigates to a different URL?
>
> I am using Tutorial 2 as base example for this, but when a user does
> the following:
>
> Starts Tutorial 2
> Opens localhost:8080
> closes the browser

Closes the browser completely causing the browser executable to actually
exit or just closes the current window ?

At this point run netstat and see what state the connection is in.

> Reopens localhost:8080
>
> they get the error message:  Only one connection permitted.
>

[snip]
>
> I tried the On_Abort event, but it doesn't seem to call when the
> browser closes or you navigate to a different URL.  Is there something
> I can do.  I want this to be as seamless for my users as possible.
>

This behaviour is potentially browser specific; I could see how a
browser may potentially cache connections in case you decide to
go back to the page you just left.

After you browse to a different URL, check netstat and see if the
original connection is still in an ESTABLISHED state or if the
browser has actually closed the connection.

Simon.

-- 
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Microsoft: Bringing you 1980s technology to a 21st century world


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  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
  0 siblings, 2 replies; 36+ messages in thread
From: David Botton @ 2014-10-13 21:12 UTC (permalink / raw)


> Question: Is there currently or will there be a way to tell when the
> user closes the browser window or navigates to a different URL?

There are a few ways, the simplest is in the On_Connect procedure use Connection.Hold at the end, if the connection is lost the semaphore will release and you can add clean up code there before anything finalizes on its own.

> > I am using Tutorial 2 as base example for this, but when a user does
> > the following:

Remember Tutorial 2 is using a "Singleton" model, one time run. Good for tools and single runs from the command line, etc.

If you leave the page it will always close the connection on a singleton permanently. It should close the application as well. I'll double check to make sure that is the case.

You should consider basing off of one of the later multi_connect tutorials if you think more than one connection will exists or running on the internet. See the snake demo for a full example.

David Botton

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-13 21:12     ` David Botton
@ 2014-10-13 21:20       ` David Botton
  2014-10-13 23:29       ` Jeremiah
  1 sibling, 0 replies; 36+ messages in thread
From: David Botton @ 2014-10-13 21:20 UTC (permalink / raw)


Just to be clear On_Connect is on Multi_Connect apps, see - Gnoga.Application.Multi_Connect

David Botton

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  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
  1 sibling, 1 reply; 36+ messages in thread
From: Jeremiah @ 2014-10-13 23:29 UTC (permalink / raw)


On Monday, October 13, 2014 5:12:46 PM UTC-4, David Botton wrote:
> > Question: Is there currently or will there be a way to tell when the
> 
> > user closes the browser window or navigates to a different URL?
> 
> 
> 
> There are a few ways, the simplest is in the On_Connect procedure use Connection.Hold at the end, if the connection is lost the semaphore will release and you can add clean up code there before anything finalizes on its own.
> 
> 
> 
> > > I am using Tutorial 2 as base example for this, but when a user does
> 
> > > the following:
> 
> 
> 
> Remember Tutorial 2 is using a "Singleton" model, one time run. Good for tools and single runs from the command line, etc.
> 
> 
> 
> If you leave the page it will always close the connection on a singleton permanently. It should close the application as well. I'll double check to make sure that is the case.
> 
> 
> 
> You should consider basing off of one of the later multi_connect tutorials if you think more than one connection will exists or running on the internet. See the snake demo for a full example.
> 
> 
> 
> David Botton

I'll check out multi connect, though my use case would be a single connect one (making applications for a single desktop user), so I would need to make a multi connect act like a singleton (I can do this though), but that does feel weird to me.  I chose singleton because it fits what I need at a glance.  

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.  I assume because Gnoga.Application.Singleton.End_Application isn't called, but I have not found a way to figure out "when" to call that since I don't have a way of telling when the browser closes or navigates to a different page.  I did not check multi connect but I can play with that as well and see, though I would have assumed Connection.Hold acted the same way as Gnoga.Application.Singleton.Message_Loop in terms of how it locked/unlocked.

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.


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-13 23:29       ` Jeremiah
@ 2014-10-13 23:34         ` David Botton
  2014-10-13 23:58           ` Jeremiah
  2014-10-14  0:06           ` David Botton
  0 siblings, 2 replies; 36+ messages in thread
From: David Botton @ 2014-10-13 23:34 UTC (permalink / raw)


> 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



^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-13 23:34         ` David Botton
@ 2014-10-13 23:58           ` Jeremiah
  2014-10-14  2:38             ` David Botton
  2014-10-14  0:06           ` David Botton
  1 sibling, 1 reply; 36+ messages in thread
From: Jeremiah @ 2014-10-13 23:58 UTC (permalink / raw)


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

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-13 23:34         ` David Botton
  2014-10-13 23:58           ` Jeremiah
@ 2014-10-14  0:06           ` David Botton
  2014-10-14  0:24             ` David Botton
  1 sibling, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-14  0:06 UTC (permalink / raw)


Interesting... In general I've had a lot of strange interactions with tasking and AWS events.

If the Connection_Holder_Type (a protected type, basic no resetting semiphore) is released from with the AWS websocket event it does not release the holds in side the main application.

It seems a bug to me with GNAT and/or AWS but I don't have the time now to spend on a reproducer, etc. although easy enough to reproduce using just Gnoga. 

For person future refernce as of git commit e5cfd8019249a0fe9ffbf3085861e90b4b75c3fd

Based on the current implementation, it should already be working, ie. Message_Loop will end on break of connection in a Singleton and any clean up can be done and the app exit. Officially that is how it should and God willing soon enough (with a work around) will work.

On_Destroy shouldn't be needed to end the app (and in fact would be too late), but could be used for clean up as will fire on finalization of the Main_Window.

David Botton




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-14  0:06           ` David Botton
@ 2014-10-14  0:24             ` David Botton
  2014-10-14  2:26               ` David Botton
  0 siblings, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-14  0:24 UTC (permalink / raw)


My gut feeling based on this issue and a previous issue that I worked around is that the AWS web socket events are using system threads and not Ada tasks and there is some incompatibility between them.

Pascal Obry should know off hand how the web socket events are being implemented. I'll look at the code at some later date. If not as I suspect then part of some larger GNAT bug for sure.

The "fix" would be to do what I had to do for the On_Message events, but in AWS, and that is hand off to another Ada task to do the dispatching. (I still need to go add the code to clean up the Ada Task records being created internally by GNAT since I am using dynamic tasks instead of a task pool, or I just need to switch to a task pool, will see).

That is the work around I'll try now as well, but something like that should likely be part of AWS. It is also likely why ATC will break things and likely I bet the cause of past issues I had with PolyORB and ATC. I don't have AdaCore credentials anymore as far as I know so I can't look up on TNs of mine on it, but willing to be was the same issue.

David Botton

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-14  0:24             ` David Botton
@ 2014-10-14  2:26               ` David Botton
  2014-10-15  2:01                 ` Jeremiah
  0 siblings, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-14  2:26 UTC (permalink / raw)


The issue was not the PO not being released in the AWS events. Was a poor analysis of the issue by me mixing up two different variables.. I shouldn't talk while debugging, I always eat the words in the middle when I do it : (  I just get excited in the hunt... I need less enthusiasm sometimes for these things since humble pies haven't worked so far for me :)

Ok, the fix is checked in to git.

I changed how I handle holding the connection in the singleton so now works as should.

If Application.Singleton.End_Application is called or the browser window is closed, Application.Singleton.Message_Loop will return. Any clean up can then be made after that before the main procedure ends.

David Botton

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-13 23:58           ` Jeremiah
@ 2014-10-14  2:38             ` David Botton
  2014-10-14  2:45               ` David Botton
  0 siblings, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-14  2:38 UTC (permalink / raw)


Jeremiah, while I recommend using the fixed Singleton and not a work around with Multi_Connect, your code does work with no issue and acts like a singleton and shuts down properly.

It takes though in general on my machine 5-10 seconds for AWS to shut down. If you ever needed a more abrupt shut down could use GNAT.OS_Lib.Exit (0) to force the application to shutdown without properly cleaning up.

David Botton

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-14  2:38             ` David Botton
@ 2014-10-14  2:45               ` David Botton
  0 siblings, 0 replies; 36+ messages in thread
From: David Botton @ 2014-10-14  2:45 UTC (permalink / raw)


One more note, Main_Window.Connection_Data (App.all);  should be since last nights update - Main_Window.Connection_Data (App);

I changed to use an access parameter since the default has been to deallocate App on close.

I thought about getting rid of the default param for Connection_Data and forcing the choice, but since at this point almost all programs use dynamically allocated app data, it is very unlikely someone will purposely do a static App data and App'Access without realizing the need to set the other parameter to turn off the garbage collecting.

David Botton

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-12  3:49 Gnoga Latest Updates David Botton
                   ` (2 preceding siblings ...)
  2014-10-13 16:22 ` jeremiah.breeden
@ 2014-10-14 23:52 ` David Botton
  2014-10-15  0:30   ` David Botton
  2014-10-15 15:54 ` David Botton
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-14 23:52 UTC (permalink / raw)


Added not Gnoga.Client.Bind_Page

Using this if you load a page with existing HTML or dump tons of HTML on a page using the Template Parsers or the various Put, Put_Line, Put_HTML methods on views, you can run Bind_Page and any element with an ID will be bound to a Gnoga Element_Type so can be manipulated by Gnoga.

David Botton

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-14 23:52 ` David Botton
@ 2014-10-15  0:30   ` David Botton
  0 siblings, 0 replies; 36+ messages in thread
From: David Botton @ 2014-10-15  0:30 UTC (permalink / raw)


> Added not Gnoga.Client.Bind_Page

No, I did add it.. Along the lines of that I have also added /js/boot.js

You can now take any existing page and add:

      <script src="/js/jquery.min.js"></script>
      <script src="/js/boot.js"></script>

Then if you navigate to that existing page, say: http://127.0.0.1:8080/bootjs_demo.html when then html page is loaded it will connect back to the gnoga application.

Of course your Gnoga app should be ready to handle that, the simplest way is:

   Application.Multi_Connect.On_Connect_Handler
     (Event => On_BootJS_Demo_Page'Unrestricted_Access,
      Path  => "bootjs_demo.html");

You can see a sample of this in /test/bootjs.adb

David Botton


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-14  2:26               ` David Botton
@ 2014-10-15  2:01                 ` Jeremiah
  2014-10-15  3:49                   ` David Botton
  0 siblings, 1 reply; 36+ messages in thread
From: Jeremiah @ 2014-10-15  2:01 UTC (permalink / raw)


On Monday, October 13, 2014 10:26:56 PM UTC-4, David Botton wrote:
> If Application.Singleton.End_Application is called or the browser window is closed, Application.Singleton.Message_Loop will return. Any clean up can then be made after that before the main procedure ends.
> 
> 
> 
> David Botton

I did retest out Tutorial 2 with the latest load since it was the quickest way to test.  Closing the browser or navigating away does indeed cause the application to finish cleanly now using Singleton.  However, as a side effect of the fix, the exit app button either causes the program to hang until windows asks to stop it or it gives an exception:
C:\MinGW\msys\1.0\home\Jere\gnoga-code-2014_10_14\bin\tutorial_02
Starting Web Server with web root at ../
Starting Gnoga Server on :8080
Dispatch Error
PROGRAM_ERROR - EXCEPTION_ACCESS_VIOLATION

Not that I was planning on using the exit button, but wanted you to know in case.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-15  2:01                 ` Jeremiah
@ 2014-10-15  3:49                   ` David Botton
  0 siblings, 0 replies; 36+ messages in thread
From: David Botton @ 2014-10-15  3:49 UTC (permalink / raw)


> Not that I was planning on using the exit button, but wanted you to know in case.

Yes, but very appreciated! I was using a different project to test the fix.

It ends up there was a race condition on shutting things down while handling the "click" event, after On_Click is called, On_Message calls On_Mouse_Click but by then things were already shut down. Instead of directly forcing a server stop I switched to just close the websocket which now works to shut down everything gracefully.

git has the fix.

Thanks!
David Botton


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-12  3:49 Gnoga Latest Updates David Botton
                   ` (3 preceding siblings ...)
  2014-10-14 23:52 ` David Botton
@ 2014-10-15 15:54 ` David Botton
  2014-10-19  4:40 ` David Botton
  2014-10-19 23:02 ` David Botton
  6 siblings, 0 replies; 36+ messages in thread
From: David Botton @ 2014-10-15 15:54 UTC (permalink / raw)


I've made a number of improvements to the make system for Gnoga.

make gnoga
--  build gnoga debug (default)

make release
--  build optimized

make install
--  Now uses gprinstall

make uninstall
--  Now uses gprinstall

settings.gpr 
--  Can modify the settings used to build gnoga and the coming soon gnoga tools

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-12  3:49 Gnoga Latest Updates David Botton
                   ` (4 preceding siblings ...)
  2014-10-15 15:54 ` David Botton
@ 2014-10-19  4:40 ` David Botton
  2014-10-19 12:59   ` David Botton
  2014-10-19 23:02 ` David Botton
  6 siblings, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-19  4:40 UTC (permalink / raw)


Tutorial 10 added

Illustrates -

1) Database bindings in Gnoga
2) Use of database migrations


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-19  4:40 ` David Botton
@ 2014-10-19 12:59   ` David Botton
  2014-10-19 21:36     ` Jeremiah
  0 siblings, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-19 12:59 UTC (permalink / raw)


Tutorial 11 added

Using the Active Record method to access tables in Gnoga


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-19 12:59   ` David Botton
@ 2014-10-19 21:36     ` Jeremiah
  2014-10-19 22:01       ` David Botton
  0 siblings, 1 reply; 36+ messages in thread
From: Jeremiah @ 2014-10-19 21:36 UTC (permalink / raw)


On Sunday, October 19, 2014 8:59:54 AM UTC-4, David Botton wrote:
> Tutorial 11 added
> 
> 
> 
> Using the Active Record method to access tables in Gnoga

Thanks for the update.  I was gonna post an issue with Tutorial 09 but this latest update seems to fix it.  I wasn't able to build 10 or 11.  I assume I need SQL most likely?

Also, what is a good medium for asking general Gnoga questions, whether they be simply understanding how things are meant to work or if things will be added in the future, etc.?  I don't really want to hijack your updates thread and making a thread on comp.lang.ada specifically to you each time I have a question seems like bad forum etiquette on my part (plus might be unwieldy for you anyways).

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-19 21:36     ` Jeremiah
@ 2014-10-19 22:01       ` David Botton
  0 siblings, 0 replies; 36+ messages in thread
From: David Botton @ 2014-10-19 22:01 UTC (permalink / raw)


> Thanks for the update.  I was gonna post an issue with Tutorial 09 but this latest update seems to fix it.  I wasn't able to build 10 or 11.  I assume I need SQL most likely?

For those two tutorials yes, they use SqlLite3

> Also, what is a good medium for asking general Gnoga questions

The goal of Gnoga is to encourage Ada enthusiasm and Ada use in the application space. Asking questions and getting answers may just get others interested in exploring it and/or Ada.

I don't see asking questions about Gnoga on CLA as any different from questions about GtkAda or AWS. 

However, There is a gnoga list (just as there are lists for AWS, GtkAda, GWindows, and many other projects) and you can join it and post to it if you would like or think your question truly not relevant to others:

https://lists.sourceforge.net/lists/listinfo/gnoga-list


David Botton

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-12  3:49 Gnoga Latest Updates David Botton
                   ` (5 preceding siblings ...)
  2014-10-19  4:40 ` David Botton
@ 2014-10-19 23:02 ` David Botton
  2014-10-20  0:42   ` Jeffrey Carter
  6 siblings, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-19 23:02 UTC (permalink / raw)


As of this last update:

1) I have added a simple all Ada template parser (so now possible to use PHP, Python or a simple token replace for text parsing)

2) It is no long required that you cd in to the bin directory to execute a gnoga application

3) The executable can be in a bin subdirectory or at the application root directory

4) Any missing sub directories (/js, /img, /css) are assumed to be in /html, if /html is also missing all files are assumed to be in the applications root directory. (e.g. you could place the snake executable and boot.html in the same directory and snake will run with no issue now)




^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-19 23:02 ` David Botton
@ 2014-10-20  0:42   ` Jeffrey Carter
  2014-10-20 20:38     ` David Botton
  0 siblings, 1 reply; 36+ messages in thread
From: Jeffrey Carter @ 2014-10-20  0:42 UTC (permalink / raw)


On 10/19/2014 04:02 PM, David Botton wrote:
> 
> 4) Any missing sub directories (/js, /img, /css) are assumed to be in /html,
> if /html is also missing all files are assumed to be in the applications root
> directory. (e.g. you could place the snake executable and boot.html in the
> same directory and snake will run with no issue now)

That seems like an important improvement.

-- 
Jeff Carter
"No one is to stone anyone until I blow this whistle,
do you understand? Even--and I want to make this
absolutely clear--even if they do say, 'Jehovah.'"
Monty Python's Life of Brian
74

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-20  0:42   ` Jeffrey Carter
@ 2014-10-20 20:38     ` David Botton
  2014-10-22  2:11       ` David Botton
  0 siblings, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-20 20:38 UTC (permalink / raw)


> That seems like an important improvement.

What it also means is that you can now launch Gnoga apps from with in GPS with no issue, so yes a nice improvement :)

David Botton


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-20 20:38     ` David Botton
@ 2014-10-22  2:11       ` David Botton
  2014-10-23  3:46         ` David Botton
  0 siblings, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-22  2:11 UTC (permalink / raw)



jQueryUI comes to Gnoga

I have now added Gnoga.Gui.Plugins.jQueryUI so far all the Interactions and Effects have been added so can now do all sorts of nice little animations, etc.

I will be binding the jQueryUI widgets soon as well.

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-22  2:11       ` David Botton
@ 2014-10-23  3:46         ` David Botton
  2014-10-24  3:54           ` David Botton
  0 siblings, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-23  3:46 UTC (permalink / raw)


Today brings:

Additional width and height methods for elements (Inner, Outer, Outer_To_Margin)

jQueryUI widgets -
    Buttons
    Button Sets
    Accordion
    Tooltips
    Menus

^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-23  3:46         ` David Botton
@ 2014-10-24  3:54           ` David Botton
  2014-10-26  4:22             ` David Botton
  0 siblings, 1 reply; 36+ messages in thread
From: David Botton @ 2014-10-24  3:54 UTC (permalink / raw)


Today brings

jQueryUI Dialogs

This neat widget lets you create an entire desktop on a page if needed. A much better choice to popup windows as well.

Some small changes were made to the Form_Type to allow setting Action and Method in the Create.


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-24  3:54           ` David Botton
@ 2014-10-26  4:22             ` David Botton
  0 siblings, 0 replies; 36+ messages in thread
From: David Botton @ 2014-10-26  4:22 UTC (permalink / raw)


jQueryUI

Progress Bar
Select Menu
Tabs

which for now wraps up the binding of Gnoga.Gui.Plugin.jQueryUI


^ permalink raw reply	[flat|nested] 36+ messages in thread

* Re: Gnoga Latest Updates
  2014-10-12 23:29     ` David Botton
@ 2014-10-28 10:18       ` tonyg
  0 siblings, 0 replies; 36+ messages in thread
From: tonyg @ 2014-10-28 10:18 UTC (permalink / raw)



Ok I'll do that :)

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2014-10-28 10:18 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox