Re: [Gnoga-list] GIT master branch discussion.
Hello Pascal, I vote (d) for the reasons expressed by Rolf. Cheers, Gautier *From:* Blady *Sent:* Dimanche, Mars 20, 2022 12:15PM *To:* Gnoga-List *Cc:* David Botton , Jeffrey R. Carter , David Botton , Gdemont *Subject:* GIT master branch discussion. Hello, The master branch of the Gnoga GIT repo is stuck on version 1.2a for many years. Some users point out that, for instance: "It is customary when using git to have the master branch point at the latest stable branch. Is there any reason not to for gnoga?" (from Tama) Thus I propose some options: a) set master to the last stable V1 commit, that is V1.6a b) set master to the last V1 commit, that is V1.7-alpha c) set master to the last stable V2 commit, that is V2.1a d) set master to the last V2 commit, that is V2.2-alpha e) add branches named edge, stable... f) do nothing My preference is for a). What is your feedback? Thanks, Pascal. https://blady.pagesperso-orange.fr ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] V1.6-beta release.
Hi Pascal, Congrats for your efforts! I update my main to-do list with: "Test 1.6 on Windows" :-) Gautier ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Getting started
Hi David, Happy to know you are fit again! In the Gnoga package I have a document on how to design using an editor (I think I have there also a link to one) and link to elements in the design. For creating pro Apps that is the best way I have found to develop my apps. A link to an editor would be helpful (I didn't manage to find one in the doc). I guess you have a plugin generating Gnoga code from the design? Cheers Gautier ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Pasta - levels 37 to 40
In case someone recently experienced nasty oversized advertisements when playing, the issue is now fixed (was an incompatibility on Google's side). BTW, there are a few blog posts about the game's development - including some screenshots of GNAT [Programming] Studio or of LEA, with Pasta! levels coded as Ada aggregates, here: https://gautiersblog.blogspot.com/search/label/Pasta FYI: I have programmed (or rather designed, but it's in Ada code!) the levels 37 to 40 of Pasta!, they are now online. http://pasta.phyrama.com Enjoy! Gautier ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] V1.5-beta release.
I always got this link error, on various versions of Gnoga on Windows, so I guess it is on purpose. The solution (at least the one I've found) is to download a fresh version of sqlite3.c (a massive C file containing the entire sqlite code), to compile it and to put sqlite3.o into the right folder. ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Drag and Drop Horizontal Only
Perhaps there is a horizontal slider widget that would do the job ? Otherwise you can set up a PIXI sprite and link its its X position to mouse movements. ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] 5g and Gnoga
C++ 😉 ? ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Pasta - levels 37 to 40
FYI: I have programmed (or rather designed, but it's in Ada code!) the levels 37 to 40 of Pasta!, they are now online. http://pasta.phyrama.com Enjoy! Gautier ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] New Pasta levels 31-33
New levels of the very famous GNOGA game ;-) are available after 1 1/2 year of sleep (more or less)... http://pasta.phyrama.com/ The "making of" is disclosed here: https://gautiersblog.blogspot.com/2019/03/piazza-4.html Enjoy! Gautier ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Gnoga/WebGL
Wow! If you find a way to adapt pure GL code to Gnoga-WebGL, you have a 3D engine in Ada, for free, for Gnoga: https://globe3d.sourceforge.io/ ... then, a multiplayer 3D game is a real possibility :-) G. ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Touch screen support in Gnoga?
At least it is in the git tree : https://sourceforge.net/p/gnoga/code/ci/dev_1.5/tree/demo/leaves/ De : Brad Moore<mailto:brad.mo...@shaw.ca> Envoyé le :jeudi, 17 janvier 2019 16:09 À : gnoga-list<mailto:gnoga-list@lists.sourceforge.net> Objet :Re: [Gnoga-list] Touch screen support in Gnoga? Hi Gautier, I do not have a Leaves demo under ./demo. Is that in the latest version of gnoga? I thought thats what I had when I did the git clone. Regards, Brad - Original Message ----- > From: "Gautier de Montmollin" > To: "gnoga-list" > Sent: Wednesday, January 16, 2019 6:04:03 AM > Subject: Re: [Gnoga-list] Touch screen support in Gnoga? > Hi Brad, > Thanks! Of course, as you probably saw, "Pasta!" needs some more work, on the > animation side for instance... > Source is not available (at least yet) but you have most of the match-3 game > engine in the "Leaves" demo (under ./demo ...). "Pasta!" is just a bit > extended > from that demo (OK, plus the 30 levels, the maps, the database stuff with high > scores, nicknames, etc. 😊 ). > Cheers > Gautier > > From: Brad Moore > Sent: Tuesday, January 15, 2019 5:12 AM > To: gnoga-list > Subject: Re: [Gnoga-list] Touch screen support in Gnoga? > > Thank you Gautier! > > That worked perfectly. Is that planned to be added to the official source? It > seems like it should be. > > Also, great job on the pasta game! Very well done! > > Is the source for that available? > > I'm looking to add some features that I notice you already have in yours, > and I would be interested in seeing how you did that. > > In particular, I'd like to add a sound effect connected to a mouse event, > and I'd like to fill the background of say a canvas object to a picture. > > Possibly even a video played back within a canvas or gui object? > > Regards, > > Brad > > > - Original Message - >> From: "Gautier de Montmollin" >> To: "gnoga-list" >> Sent: Sunday, January 13, 2019 4:45:42 PM >> Subject: Re: [Gnoga-list] Touch screen support in Gnoga? > >> In the 2017 thread, it is not clear what needs to be changed, so here is >> a result of "diff boot.js phyrama_boot.js" (you can see it in action @ >> http://pasta.phyrama.com/ ): >> >> * >> >> 68a69,103 >> > function touchHandler(event) >> > { >> > var touches = event.changedTouches, >> > first = touches[0], >> > type = ""; >> > switch(event.type) >> > { >> > case "touchstart": type = "mousedown"; break; >> > case "touchmove": type = "mousemove"; break; >> > case "touchend": type = "mouseup"; break; >> > default: return; >> > } >> > >> > // initMouseEvent(type, canBubble, cancelable, view, clickCount, >> > //screenX, screenY, clientX, clientY, ctrlKey, >> > //altKey, shiftKey, metaKey, button, >> relatedTarget); >> > >> > var simulatedEvent = document.createEvent("MouseEvent"); >> > simulatedEvent.initMouseEvent(type, true, true, window, 1, >> > first.screenX, first.screenY, >> > first.clientX, first.clientY, false, >> > false, false, false, 0/*left*/, >> null); >> > >> > first.target.dispatchEvent(simulatedEvent); >> > // event.preventDefault(); >> > } >> > >> > function touch2mouseinit() >> > { >> > document.addEventListener("touchstart", touchHandler, true); >> > document.addEventListener("touchmove", touchHandler, true); >> > document.addEventListener("touchend", touchHandler, true); >> > document.addEventListener("touchcancel", touchHandler, true); >> > } >> > >> 91c126 >> < console.log ("connecting to " + adr); >> --- >> > console.log ("Gnoga: connecting to " + adr); >> 94c129 >> < console.log ("trying again, connecting to " + adr); >> --- >> > console.log ("Gnoga: trying again, connecting to " + adr); >> 100c135 >> <console.lo
Re: [Gnoga-list] Touch screen support in Gnoga?
Hi Brad, Thanks! Of course, as you probably saw, "Pasta!" needs some more work, on the animation side for instance... Source is not available (at least yet) but you have most of the match-3 game engine in the "Leaves" demo (under ./demo ...). "Pasta!" is just a bit extended from that demo (OK, plus the 30 levels, the maps, the database stuff with high scores, nicknames, etc. 😊 ). Cheers Gautier From: Brad Moore Sent: Tuesday, January 15, 2019 5:12 AM To: gnoga-list Subject: Re: [Gnoga-list] Touch screen support in Gnoga? Thank you Gautier! That worked perfectly. Is that planned to be added to the official source? It seems like it should be. Also, great job on the pasta game! Very well done! Is the source for that available? I'm looking to add some features that I notice you already have in yours, and I would be interested in seeing how you did that. In particular, I'd like to add a sound effect connected to a mouse event, and I'd like to fill the background of say a canvas object to a picture. Possibly even a video played back within a canvas or gui object? Regards, Brad ----- Original Message - > From: "Gautier de Montmollin" > To: "gnoga-list" > Sent: Sunday, January 13, 2019 4:45:42 PM > Subject: Re: [Gnoga-list] Touch screen support in Gnoga? > In the 2017 thread, it is not clear what needs to be changed, so here is > a result of "diff boot.js phyrama_boot.js" (you can see it in action @ > http://pasta.phyrama.com/ ): > > * > > 68a69,103 > > function touchHandler(event) > > { > > var touches = event.changedTouches, > > first = touches[0], > > type = ""; > > switch(event.type) > > { > > case "touchstart": type = "mousedown"; break; > > case "touchmove": type = "mousemove"; break; > > case "touchend": type = "mouseup"; break; > > default: return; > > } > > > > // initMouseEvent(type, canBubble, cancelable, view, clickCount, > > //screenX, screenY, clientX, clientY, ctrlKey, > > //altKey, shiftKey, metaKey, button, > relatedTarget); > > > > var simulatedEvent = document.createEvent("MouseEvent"); > > simulatedEvent.initMouseEvent(type, true, true, window, 1, > > first.screenX, first.screenY, > > first.clientX, first.clientY, false, > > false, false, false, 0/*left*/, > null); > > > > first.target.dispatchEvent(simulatedEvent); > > // event.preventDefault(); > > } > > > > function touch2mouseinit() > > { > > document.addEventListener("touchstart", touchHandler, true); > > document.addEventListener("touchmove", touchHandler, true); > > document.addEventListener("touchend", touchHandler, true); > > document.addEventListener("touchcancel", touchHandler, true); > > } > > > 91c126 > < console.log ("connecting to " + adr); > --- > > console.log ("Gnoga: connecting to " + adr); > 94c129 > < console.log ("trying again, connecting to " + adr); > --- > > console.log ("Gnoga: trying again, connecting to " + adr); > 100c135 > <console.log ("connection successful"); > --- > >console.log ("Gnoga: connection successful"); > 105c140 > < document.writeln ("If you are seeing this your browser or your > connection to the internet is blocking websockets."); > --- > > document.writeln ("Gnoga: if you are seeing this your browser > or your connection to the internet is blocking websockets."); > 107c142,146 > < }); > --- > > > > touch2mouseinit(); > > > > console.log ("Gnoga: ready."); > > }); > > > ___ > Gnoga-list mailing list > Gnoga-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gnoga-list ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Touch screen support in Gnoga?
In the 2017 thread, it is not clear what needs to be changed, so here is a result of "diff boot.js phyrama_boot.js" (you can see it in action @ http://pasta.phyrama.com/ ): * 68a69,103 > function touchHandler(event) > { > var touches = event.changedTouches, > first = touches[0], > type = ""; > switch(event.type) > { > case "touchstart": type = "mousedown"; break; > case "touchmove": type = "mousemove"; break; > case "touchend": type = "mouseup"; break; > default: return; > } > > // initMouseEvent(type, canBubble, cancelable, view, clickCount, > // screenX, screenY, clientX, clientY, ctrlKey, > // altKey, shiftKey, metaKey, button, relatedTarget); > > var simulatedEvent = document.createEvent("MouseEvent"); > simulatedEvent.initMouseEvent(type, true, true, window, 1, > first.screenX, first.screenY, > first.clientX, first.clientY, false, > false, false, false, 0/*left*/, null); > > first.target.dispatchEvent(simulatedEvent); > // event.preventDefault(); > } > > function touch2mouseinit() > { > document.addEventListener("touchstart", touchHandler, true); > document.addEventListener("touchmove", touchHandler, true); > document.addEventListener("touchend", touchHandler, true); > document.addEventListener("touchcancel", touchHandler, true); > } > 91c126 < console.log ("connecting to " + adr); --- > console.log ("Gnoga: connecting to " + adr); 94c129 < console.log ("trying again, connecting to " + adr); --- > console.log ("Gnoga: trying again, connecting to " + adr); 100c135 < console.log ("connection successful"); --- > console.log ("Gnoga: connection successful"); 105c140 < document.writeln ("If you are seeing this your browser or your connection to the internet is blocking websockets."); --- > document.writeln ("Gnoga: if you are seeing this your browser or your connection to the internet is blocking websockets."); 107c142,146 < }); --- > > touch2mouseinit(); > > console.log ("Gnoga: ready."); > }); ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Touch screen support in Gnoga?
Hi Brad, Short answer: it's possible if you hack a bit boot.js. Luckily for you, I had the same issue, so if you google "gnoga mailing list touchscreen" you'll find a thread about it and a solution involving boot.js. HTH Gautier > Hello, > > I am experimenting with a game that involves tracking mouse movements. > I notice when I play the game on a smartphone, without a mouse, there appears > to be no activity > related to screen touches. > > Do you know if touch events are supported currently in Gnoga? ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Simple_Query for Gnoga.Server.Database
Cool to see activity on Gnoga! Coincidentally I was working on the Pasta! game. An idea for a very useful addition to Gnoga.Server.Database would be a Simple_Query function for getting just a single information from a database. The function would take care of connection, recordset and work much like when you type some SQL statement for getting a number or name in your preferred SQL interface. Concretely, instead of: function Rank_to_score (level, score : String) return String is DB : aliased Gnoga.Server.Database.SQLite.Connection; begin DB.Connect (Database => phyrama_db_name); declare -- Count all better scores and put target score as first ex-aequo. RS : Gnoga.Server.Database.Recordset'Class := DB.Query ( "select 1 + count(Best_score) as Rank from Pasta_best_score" & " where Level = " & level & " and Best_score > " & score & " order by Best_score desc" ); begin if RS.Next then declare result : constant String := RS.Field_Value ("Rank"); begin RS.Close; DB.Disconnect; return result; end; end if; RS.Close; DB.Disconnect; end; return ""; end Rank_to_score; you would have only: function Rank_to_score (level, score : String) return String is begin return Simple_Query (Database => phyrama_db_name, Query => "select 1 + count(Best_score) as Rank from Pasta_best_score" & " where Level = " & level & " and Best_score > " & score & " order by Best_score desc"); end; the function Simple_Query would of course look much like the 1st version of Rank_to_score. Just need to abstract the kind of database (here it is SQLite). How to do it best? Perhaps by using 'Class for reaching all of MySQL, SQLite etc. ? If you want to seean example "in production", I've added Simple_Query to the cousin of Gnoga.Server.Database, GWindows.Databases https://sourceforge.net/p/gnavi/code/HEAD/tree/gwindows/framework/gwindows-databases.ads#l365 https://sourceforge.net/p/gnavi/code/HEAD/tree/gwindows/framework/gwindows-databases.adb#l1119 Cheers Gautier __ PS: now Pasta! shows your rank when your high score is not in the top 6 :-) ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] [ANN] Gnoga gallery.
Gr8 ! ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] V1.4-beta release.
> Hello Gautier, > > Did you try the patch of Jeff as he proposed on the list? > https://sourceforge.net/p/gnoga/mailman/message/36384512/ Ow, missed that! I'll have a look... > If correct, could you do similar thing for ping? I'll try... ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] V1.4-beta release.
> If you agree on this proposal I will add it in Gnoga the coming version > 1.5-alpha. > Another good thing would be to try to stabilize Gnoga, for instance the Ping issue I've mentioned in July. My Pasta server freezes almost every morning (Central European time). I guess it is when a certain very regular player is done. Perhaps it's triggered by a particular browser's behavior (I'm not tracking this). In approximately half of the cases it's the "ping freeze". Cheers Gautier ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] [ANN] Gnoga gallery.
Hi Pascal, To make everybody happy, a solution could be to have a link from the small image to the larger one. It's what I'm doing in my projects' Web pages, for instance: https://excel-writer.sourceforge.io/ It is also common on Wikipedia, so perhaps also available in the SF wiki? Gautier > Each image is a screen capture of the program which may be large or small > depending of the program display. > Big ones are then displayed shortened. > I'll take care to capture always the same size in order to get homogeneous > size on the wiki. > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] AWS server for GNOGA
Hello, I've put a few shortcuts through the AWS (Amazon's cloud) jungle for setting up GNOGA servers in a reasonable time... http://gautiersblog.blogspot.com/2018/08/setting-up-simple-aws-amazon-web.html Cheers Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Crash on ping
Hello, First Gnoga server crash, in 1 year of almost uninterrupted service in the Pasta! game! I put hereafter the trace-back in case someone wants (and knows how) to do something good about it... Cheers Gautier _ 2018-07-22 06:26:30.09 : Ping on websocket - 27 2018-07-22 06:27:30.09 : Ping on websocket - 27 2018-07-22 06:27:30.10 : Ping 27 error. 2018-07-22 06:27:30.10 : raised GNAT.SOCKETS.SOCKET_ERROR : [10053] Software caused connection abort Here is the call stack trace-back: gnoga_dev_1.3-2017_04_11/deps/simple_components/atomic-access/gcc-long-offsets/gnat-sockets-server.adb:948 [ Send_Socket (Client.Socket, Data, Last); ] gnoga_dev_1.3-2017_04_11/deps/simple_components/gnat-sockets-connection_state_machine-http_server.adb:3574 [ Push (Client, Data (Pointer..Data'Last), Next); ] gnoga_dev_1.3-2017_04_11/deps/simple_components/gnat-sockets-connection_state_machine-http_server.adb:3886 [ WebSocket_Blocking_Send (Client, Header, True, False); ] gnoga_dev_1.3-2017_04_11/src/gnoga-server-connection.adb:1197 [ Socket.WebSocket_Send ("0"); ] gnoga_dev_1.3-2017_04_11/src/gnoga-server-connection.adb:1240 [ Ping (ID); ] -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] localhost
Same for me, in my setup host stays unspecified (the default := ""), port is either 80 for Internet or 8083 for localhost (could be 8080 as well) Application.Multi_Connect.Initialize (Event => On_Connect'Unrestricted_Access, Port => Pasta.Gnoging.Test_or_release.ze_port, Boot => "pasta_boot.html"); -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Cannot clone SF repo
SF migrated their "data center" elsewhere and did not yet completely recover from the move. A convenient solution I've used for 16 other projects @ SF is svn2github which is an automated cloning bot, with automatic daily refresh. Perhaps there is equivalently a git2github. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] CGI-Bin & Gnoga
Conclusion of the story: I've installed a tiny web server called... "tinyweb" [1] (76KB binary executable) on the same machine, using another port. So finally I did not need to mess with the Gnoga application at all. The CGI-Bin app [2] is alive again... __ [1] https://www.ritlabs.com/en/products/tinyweb/ [2] http://cbsg.sf.net/ -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Graph Non-Optimization
It looks like (by diving into calls) that each Line_To executes a script separately (see Gnoga.Server.Connection.Execute_Script). Perhaps it would improve things by sending the whole bunch ot Line_To's within the same script execution. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] CGI-Bin & Gnoga
Pascal via Gnoga-list: > Try to take the URL with > function URL (Location : Location_Type) return String; > from Gnoga.Gui.Location package and Location with > function Location (Window : Window_Type) return > Gnoga.Gui.Location.Location_Access; > from Gnoga.Gui.Window package with Window coming in On_Connect. Cool, it works - thanks! Nevertheless, for this usage, I'll still try to use a separate server (solution 1) to keep things simple (layouts, scrolling, etc. are more convoluted than I had expected...). But URL trick may be useful elsewhere... -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] CGI-Bin & Gnoga
This leads to another idea... Is there any way to retrieve the exact URL on an On_Connect ? For instance, both http://pasta.phyrama.com/ http://pasta.phyrama.com/garbage start the Pasta game, but I could do something special if the string "garbage" is spotted. No more need to mess with CGI and the like. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] CGI-Bin & Gnoga
Thanks! I'll explore solution 2 :-) . -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] CGI-Bin & Gnoga
[Just a resend as the mailing list seems to be alive again...] Hello, I have a trivial CGI-Bin app (just outputting a randomized web page to standard output [1]) and would like to host it on a Gnoga server (with unrelated contents... [2]). I have spotted occurrences of CGI-Bin stuff in the Gnoga code but have no clue about how to glue all that together. Logically, either it has to be in the Gnoga executable, or it can live as a separate executable. TIA Gautier ___ [1] The Corporate Bullshit Generator, https://sourceforge.net/projects/cbsg/ [2] Pasta, http://pasta.phyrama.com/ -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Newbie gnoga questions...
Some issues appeared in my apps when *not* using the compilation options of Gnoga, i.e. by bypassing the "with Gnoga.gpr" feature and building everything with custom options, in a standalone project file. Perhaps it is that. Otherwise (then, by with-ing the Gnoga project properly) all unhandled exceptions appear on the Gnoga console but the server continues to work - and presumably active connections also do, although the exception typically appear when a connection is closed in the middle of a script or so. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Pasta! - levels up to 30 available
Summer vacation is over, back to work! Now levels 23 .. 30 are done. Enjoy! -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Pasta! with High Scores
Hello! From now on there is a high score list appearing at the end of each successfully completed level of "Pasta!" (*). Actually the best scores were already recorded for the last couple of days, but not displayed. Enjoy! Gautier (*) http://pasta.phyrama.com/game.html -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Funny requests...
Just for the fun of it: on a Gnoga console window, I've got suddenly this: 2017-08-26 03:22:22.18 : File kind URI requested - mysql/admin/ 2017-08-26 03:22:53.76 : File kind URI requested - phpmy/ 2017-08-26 03:23:13.26 : File kind URI requested - dbadmin/ 2017-08-26 03:23:58.80 : File kind URI requested - admin/sysadmin/ 2017-08-26 03:24:14.31 : File kind URI requested - mysql/db/ 2017-08-26 03:24:57.91 : File kind URI requested - sql/phpMyAdmin2/ 2017-08-26 03:25:17.41 : File kind URI requested - db/dbadmin/ 2017-08-26 03:25:54.98 : File kind URI requested - phpMyAdmin3/ 2017-08-26 03:26:14.49 : File kind URI requested - PMA2014/ Looks like an attempt to grab some passwords ?... -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Pasta! - levels 11 to 15 available
A way to split the question would be to test - Chrome instead of FF - Pasta! vs. another Gnoga-PIXI app (pixi_sprite_test.adb) vs. a Gnoga-non-PIXI app From: Jacob Sparre Andersen Sent: Friday, July 7, 2017 7:29:44 AM To: gnoga-list@lists.sourceforge.net Subject: Re: [Gnoga-list] Pasta! - levels 11 to 15 available Gautier de Montmollin wrote: > [...] Do you have any idea why Pasta! uses unreasonable amounts of CPU? (I play it in Firefox on Debian/Jessie.) Greetings, Jacob -- "Friends don't let friends program in C++." -- Ludovic Brenta. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Pasta! - levels 11 to 15 available
Only levels 21 .. 22, but with a new kind of match (the antipasta match) and a few new sprites (one of them shows Anchor, Rotation_Velocity, Rotation_Acceleration in action...) 23 .. 30 will be "only" a question of designing the levels ;-) Enjoy! -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Pasta! - levels 11 to 15 available
It's in the works - artwork done, need to program the next "innovation": the *antipasta* (a bit like antimatter...). Thanks for push, luckily, precisely tomorrow should be a Pasta programming day... > My daughter is asking when you'll finish level 21 .. 30. :-) -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Gnoga.Server.Connection issue with GNAT
You really should ask on c.l.a. . There are professional Ada users spending lots of time doing profiling and testing various options. Why not asking them ? I did a few tests today on this interesting topic, with GNAT GPL 2016. Just grabbing a part of my toolbox used in the real world, the zip-ada compression with -ep2 option is 50% slower without -gnatp that with it (all other options being the same) on a Xeon PC. Another program, an intensive-FPU number-crunching software with large arrays, used at work, is actually 2% *faster* without -gnatp than with it, on the Xeon machine; and arond 1% *faster* on a laptop (CPU unknown). So with some testing I get a [-50% , +2%] range depending on the applications... -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Gnoga.Server.Connection issue with GNAT
Le 07.06.2017 à 18:52, Jeffrey R. Carter a écrit : > If you're using Gnoga, the time to talk to the browser will swamp everything > else, so there's no reason to suppress checks. It is a lazy assumption. If the server side does image processing for instance, there is perhaps a good reason to suppress checks. The gain in response time and CPU usage will be significant. After all why does GNAT have more and more check suppressions ? It's certainly not for the fun of it... Perhaps it's due to actual customer requests ?... I think that instead of pursuing philosophical debates, it would be better to organize a poll here or on c.l.a. about why people want to suppress checks. The results would be interesting. G. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Gnoga.Server.Connection issue with GNAT
Hi, Got it. However on Windows, v. GPL 2016 (but it might be a behaviour unexpected by AdaCore), the exception is a PROGRAM_ERROR: ACCESS_VIOLATION. I'll give a try by adding a handler for PROGRAM_ERROR (sounds clumsy...). For my understanding: in order to get the exception messages during execution, I guess you have enabled this : GNAT.Exception_Traces.Trace_On (GNAT.Exception_Traces.Every_Raise); ? From: Pascal via Gnoga-list Sent: Wednesday, June 7, 2017 10:17:06 AM To: Gnoga support list Cc: Pascal Subject: Re: [Gnoga-list] Gnoga.Server.Connection issue with GNAT Hello Gautier, Anyway, with checks on or off, an exception is raised. The difference is the detailed information you get with checks on: cmd$ gnatmake -s test17 gcc -c test17.adb gnatbind -x test17.ali gnatlink test17.ali cmd$ ./test17 P_OK: Key A not found P_OK: Key A found, element= 1 P_KO: Key B not found raised CONSTRAINT_ERROR : Test17.T_Dic.Element: no element available because key not in map P_KO: Key B found, element= 2 Poor information with checks off: cmd$ gnatmake -s -gnatp test17 gcc -c -gnatp test17.adb gnatbind -x test17.ali gnatlink test17.ali cmd$ ./test17 P_OK: Key A not found P_OK: Key A found, element= 1 P_KO: Key B not found raised CONSTRAINT_ERROR : erroneous memory access P_KO: Key B found, element= 2 But in Gnoga code, whatever the checks activation, the exception Connection_Error is raised with detailed information. Is it correct for you in this particular case? Else feel free to open a ticket. Regards, Pascal. http://blady.pagesperso-orange.fr > Le 6 juin 2017 à 23:43, Gautier de Montmollin a écrit : > > Le 06.06.2017 à 19:34, Jeffrey R. Carter a écrit : >> On 06/06/2017 06:13 PM, Gautier de Montmollin wrote: >>> Anyway, the reason of my message is that the concerned part is in >>> Gnoga.*, not in my own program. >>> >> The reason for my message is to point out that, unless you're sure about all >> of >> the code in your program, you'd better not suppress checks. > Could not agree more! But again, it is not my program. >> The only justification for suppressing checks is that there's no other way to >> meet the timing requirements. In many decades of using languages with >> run-time >> checks, I've never encountered such a situation. > Lucky you! > > Now, you cannot expect everybody not having to suppress checks at any > point in time. > Since Gnoga is meant to be a library for a broad usage (the 'o' in > "omnificent") and used by various people, it is better to make it > bullet-proof and work with different sets of GNAT options - even those > you don't like or, in this special case, make the RTL not compliant with > the Ada standard. > > G. > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Gnoga-list mailing list > Gnoga-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Limiting new connections per second (or better anti-robot tactic...)
Thanks a lot! You probably guessed well, these kind of robots are not so polite and will ignore robots.txt. The good ones will visit once a day and respect robots.txt... So I'll have a look at Gnoga.Gui.Navigator. Perhaps I can figure out where the request come from and at least limit the number of requests from the same IP address during a certain amount of time T2 (say 1 day) if there were too many in a row within a time frame of length T1 (say 1 minute). It is what search engines do. G. From: Pascal via Gnoga-list Sent: Wednesday, June 7, 2017 10:30:01 AM To: Gnoga support list Cc: Pascal Subject: Re: [Gnoga-list] Limiting new connections per second (or better anti-robot tactic...) Hello Gautier, Bad case, you may log the browser agent to confirm it's robots. See Gnoga.Gui.Navigator. What about robot.txt: https://en.wikipedia.org/wiki/Robots_exclusion_standard Maybe only useful for non malware robots )-: HTH, Pascal. http://blady.pagesperso-orange.fr > Le 7 juin 2017 à 07:12, Gautier de Montmollin a écrit : > > Hello, > > What can be done when a robot is opening permanently new connections but > not using the Gnoga app? > > Perhaps limiting the number of new connections per second ? Other idea ? > > On the console you have a permanent flow of messages like below. > > TIA > > Gautier > > > > 2017-06-07 07:03:35.05 : New connection - ID 24131 > 2017-06-07 07:03:35.43 : New connection - ID 24132 > 2017-06-07 07:03:35.81 : New connection - ID 24133 > 2017-06-07 07:03:36.18 : New connection - ID 24134 > 2017-06-07 07:03:36.45 : Ping on websocket - 24130 > 2017-06-07 07:03:36.45 : Ping on websocket - 24131 > 2017-06-07 07:03:36.45 : Ping on websocket - 24132 > 2017-06-07 07:03:36.45 : Ping on websocket - 24133 > 2017-06-07 07:03:36.45 : Ping on websocket - 24134 > 2017-06-07 07:03:36.53 : New connection - ID 24135 > 2017-06-07 07:03:36.90 : New connection - ID 24136 > 2017-06-07 07:03:37.28 : New connection - ID 24137 > 2017-06-07 07:03:37.66 : New connection - ID 24138 > 2017-06-07 07:03:37.97 : Error Try_Execute - 24130 > 2017-06-07 07:03:37.97 : raised GNOGA.SERVER.CONNECTION.SCRIPT_ERROR : > Timeout error, no browser response for: ws.send ("S 102379|"+eval > ("$(window).height();")); > Call stack traceback locations: > 0x50c39a 0x50d135 0x5ac57c 0x5ac626 0x5a476b 0x5165e0 0x51c0e6 0x5a43f7 > 0x55af9e 0x51d7c5 0x401bc1 0x5bc362 0x4f6563 0x6f321c 0x748c62c2 > 0x77570fd7 0x77570fa2 > > 2017-06-07 07:03:37.97 : Error Execute_Script - 24130 > 2017-06-07 07:03:37.97 : raised GNOGA.SERVER.CONNECTION.CONNECTION_ERROR > : Socket Error during execute of : $(window).height(); > Call stack traceback locations: > 0x50cf1b 0x50d135 0x5ac57c 0x5ac626 0x5a476b 0x5165e0 0x51c0e6 0x5a43f7 > 0x55af9e 0x51d7c5 0x401bc1 0x5bc362 0x4f6563 0x6f321c 0x748c62c2 > 0x77570fd7 0x77570fa2 > > 2017-06-07 07:03:38.03 : New connection - ID 24139 > 2017-06-07 07:03:38.36 : Error Try_Execute - 24131 > 2017-06-07 07:03:38.36 : raised GNOGA.SERVER.CONNECTION.SCRIPT_ERROR : > Timeout error, no browser response for: ws.send ("S 102380|"+eval > ("window.location.pathname")); > Call stack traceback locations: > > ... > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Gnoga-list mailing list > Gnoga-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Limiting new connections per second (or better anti-robot tactic...)
Hello, What can be done when a robot is opening permanently new connections but not using the Gnoga app? Perhaps limiting the number of new connections per second ? Other idea ? On the console you have a permanent flow of messages like below. TIA Gautier 2017-06-07 07:03:35.05 : New connection - ID 24131 2017-06-07 07:03:35.43 : New connection - ID 24132 2017-06-07 07:03:35.81 : New connection - ID 24133 2017-06-07 07:03:36.18 : New connection - ID 24134 2017-06-07 07:03:36.45 : Ping on websocket - 24130 2017-06-07 07:03:36.45 : Ping on websocket - 24131 2017-06-07 07:03:36.45 : Ping on websocket - 24132 2017-06-07 07:03:36.45 : Ping on websocket - 24133 2017-06-07 07:03:36.45 : Ping on websocket - 24134 2017-06-07 07:03:36.53 : New connection - ID 24135 2017-06-07 07:03:36.90 : New connection - ID 24136 2017-06-07 07:03:37.28 : New connection - ID 24137 2017-06-07 07:03:37.66 : New connection - ID 24138 2017-06-07 07:03:37.97 : Error Try_Execute - 24130 2017-06-07 07:03:37.97 : raised GNOGA.SERVER.CONNECTION.SCRIPT_ERROR : Timeout error, no browser response for: ws.send ("S 102379|"+eval ("$(window).height();")); Call stack traceback locations: 0x50c39a 0x50d135 0x5ac57c 0x5ac626 0x5a476b 0x5165e0 0x51c0e6 0x5a43f7 0x55af9e 0x51d7c5 0x401bc1 0x5bc362 0x4f6563 0x6f321c 0x748c62c2 0x77570fd7 0x77570fa2 2017-06-07 07:03:37.97 : Error Execute_Script - 24130 2017-06-07 07:03:37.97 : raised GNOGA.SERVER.CONNECTION.CONNECTION_ERROR : Socket Error during execute of : $(window).height(); Call stack traceback locations: 0x50cf1b 0x50d135 0x5ac57c 0x5ac626 0x5a476b 0x5165e0 0x51c0e6 0x5a43f7 0x55af9e 0x51d7c5 0x401bc1 0x5bc362 0x4f6563 0x6f321c 0x748c62c2 0x77570fd7 0x77570fa2 2017-06-07 07:03:38.03 : New connection - ID 24139 2017-06-07 07:03:38.36 : Error Try_Execute - 24131 2017-06-07 07:03:38.36 : raised GNOGA.SERVER.CONNECTION.SCRIPT_ERROR : Timeout error, no browser response for: ws.send ("S 102380|"+eval ("window.location.pathname")); Call stack traceback locations: ... -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Gnoga.Server.Connection issue with GNAT
Le 06.06.2017 à 19:34, Jeffrey R. Carter a écrit : > On 06/06/2017 06:13 PM, Gautier de Montmollin wrote: >> Anyway, the reason of my message is that the concerned part is in >> Gnoga.*, not in my own program. >> > The reason for my message is to point out that, unless you're sure about all > of > the code in your program, you'd better not suppress checks. Could not agree more! But again, it is not my program. > The only justification for suppressing checks is that there's no other way to > meet the timing requirements. In many decades of using languages with run-time > checks, I've never encountered such a situation. Lucky you! Now, you cannot expect everybody not having to suppress checks at any point in time. Since Gnoga is meant to be a library for a broad usage (the 'o' in "omnificent") and used by various people, it is better to make it bullet-proof and work with different sets of GNAT options - even those you don't like or, in this special case, make the RTL not compliant with the Ada standard. G. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Gnoga.Server.Connection issue with GNAT
Thanks Jeff for this basic Ada lesson. I guess (or hope) everybody in this mailing list is avare of that. Anyway, the reason of my message is that the concerned part is in Gnoga.*, not in my own program. > If you suppress checks, you're engaging in unchecked programming and it's your > responsibility to ensure that the code never executes with values that would > cause a suppressed check to fail. If you don't, then your program is > erroneous. > > if you suppress checks in code that relies on them not being suppressed, then > your program is erroneous. > > if your program is erroneous, then you get what you deserve. > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Gnoga.Server.Connection issue with GNAT
Hello, Just spotted this function in Gnoga.Server.Connection: function Connection_Socket (ID : in Gnoga.Types.Connection_ID) return Socket_Type is begin return Socket_Map.Element (ID); exception when E : others => Log ("Error connection_Socket - " & ID'Img); Log (Ada.Exceptions.Exception_Information (E)); raise Connection_Error with "Connection ID" & ID'Img & " not found in connection map. " & "Connection most likely was previously closed."; end Connection_Socket; It is legal Ada (relying on Constraint_Error for catching a missing key) but it won't work properly with GNAT GPL 2016 onwards when pragma Suppress(Container_Checks) is activated, for instance with the -gnatp switch. In that case, the Element function will raise a PROGRAM_ERROR : EXCEPTION_ACCESS_VIOLATION not caught by the exception handler. The reason is clear in the RTL code: function Element (Container : Map; Key : Key_Type) return Element_Type is Node : constant Node_Access := Key_Ops.Find (Container.Tree, Key); begin if Checks and then Node = null then raise Constraint_Error with "key not in map"; end if; return Node.Element; end Element; Full test procedure right here (see what happens when you comment out or not line 2): -- GNAT GPL 2016 pragma, suppression included in -gnatp switch : pragma Suppress(Container_Checks); with Ada.Strings.Unbounded.Hash; use Ada.Strings.Unbounded; with Ada.Containers.Hashed_Maps; with Ada.Text_IO; use Ada.Text_IO; procedure Test_2016 is package T_Dic is new Ada.Containers.Hashed_Maps (Key_Type=> Ada.Strings.Unbounded.Unbounded_String, Element_Type=> Positive, Hash=> Ada.Strings.Unbounded.Hash, Equivalent_Keys => Ada.Strings.Unbounded."="); dic: T_Dic.Map; n: Positive:= 1; procedure P_KO(s: String) is i: Integer; begin i:= dic.Element(To_Unbounded_String(s)); Put_Line("P_KO: Key " & s & " found, element=" & Integer'Image(i)); exception when Constraint_Error => -- A.18.4, 69/2 Put_Line("P_KO: Key " & s & " not found"); dic.Insert(To_Unbounded_String(s), n); n:= n + 1; end P_KO; procedure P_OK(s: String) is i: Integer; use T_Dic; curs: Cursor; begin curs:= dic.Find(To_Unbounded_String(s)); if curs = No_Element then Put_Line("P_OK: Key " & s & " not found"); dic.Insert(To_Unbounded_String(s), n); n:= n + 1; else i:= Element(curs); Put_Line("P_OK: Key " & s & " found, element=" & Integer'Image(i)); end if; end P_OK; begin P_OK("A"); P_OK("A"); P_KO("B"); P_KO("B"); end Test_2016; There was a discussion about it in c.l.a : https://groups.google.com/forum/#!searchin/comp.lang.ada/banana$20skin%7Csort:relevance/comp.lang.ada/HZsG7Czymto/kY4BjoD0BAAJ Cheers Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Pasta! - levels 11 to 15 available
...same address: http://pasta.phyrama.com/ Eventually you'll have to redo level 10 - sorry for that. There was a bug occurring right after last available level was completed, before the increment of the counter of completed levels ; this has been corrected. Now there is some basil leaves appearing among the pasta... Have fun! Gautier __ PS: level 15 is though, but can be done with some luck and experience. I test levels right after designing them. The level design is done (as for the Leaves demo) in Ada too, e.g. : when 14 => return (columns => 7, rows=> 5, thresholds => 1, needed => (1 => (kind => 'A', min => 10)), startup_board => ( 1 | 7 => (3 => blocking_2, others => ' '), 3 | 5 => (3 => blocking_3, others => ' '), others => (others => ' ') ), moves => 10, level_probs => ('A' .. 'E' => 1.0 / 5.0, others => 0.0), logo_x => logo_x, logo_y => logo_y ); -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Message boxes
Hello, When a Message_Box (Gnoga.Gui.Plugin.Message_Boxes) is closed in the Pasta game, the console shows often an exception message about a non-existant object. This is happenning remotely, never in local. The program continues running, so it's not too disturbing depending on the nesting level of the message box call. Any clue ? Message below. The test procedure Message_Boxes seems helpless to reproduce the issue. G. -- Request to dispatch message to non-existant object 2017-05-30 23:00:23.63 : raised GNOGA.SERVER.CONNECTION.NO_OBJECT : ID: 419 E:/Ada/NO_SVN/gnoga_dev_1.3-2017_04_11/src/gnoga-server-connection.adb:1296 E:/Ada/NO_SVN/gnoga_dev_1.3-2017_04_11/src/gnoga-server-connection.adb:1289 E:/Ada/NO_SVN/gnoga_dev_1.3-2017_04_11/src/gnoga-server-connection.adb:1749 E:/Ada/NO_SVN/gnoga_dev_1.3-2017_04_11/src/gnoga-server-connection.adb:1617 E:/Ada/NO_SVN/gnoga_dev_1.3-2017_03_06/deps/simple_components/gnat-sockets-connection_state_machine-http_server.adb:2243 E:/Ada/NO_SVN/gnoga_dev_1.3-2017_03_06/deps/simple_components/gnat-sockets-connection_state_machine-http_server.adb:2663 E:/Ada/NO_SVN/gnoga_dev_1.3-2017_03_06/deps/simple_components/atomic-access/gcc-long-offsets/gnat-sockets-server.adb:824 E:/Ada/NO_SVN/gnoga_dev_1.3-2017_03_06/deps/simple_components/atomic-access/gcc-long-offsets/gnat-sockets-server.adb:865 E:/Ada/NO_SVN/gnoga_dev_1.3-2017_03_06/deps/simple_components/atomic-access/gcc-long-offsets/gnat-sockets-server.adb:2570 -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Static web content
Hello, I've noticed that static web contents (HTML pages, images) are served regardless of the existence of a "formal" connection processed by On_Connect. I suppose this happens behind the scenes with a task or one tasks per item? Just curious... I am not very proficient in the mechanics of Gnoga. Cheers Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Touchscreen events ?
Thx! In the meantime, some people will perhaps have noticed that a disturbing time lag seems to have appeared with the new version compared to the previous one when playing using the mouse. It makes the game really difficult to play. I've found a major cause I reproduce here because it is instructive about the kind of problems you come across frequently with this kind of development. A systematic lag appears in the console at the place marked with "***" 2017-05-25 04:28:58.26 : P! 20175252282900746819600> [Mouse Down] BEGIN 2017-05-25 04:28:58.26 : P! 20175252282900746819600> [Mouse Down] Event pos = 188 348 *** 2017-05-25 04:28:59.07 : P! 20175252282900746819600> [Mouse Down] Canvas pos = 76 0 2017-05-25 04:28:59.07 : P! 20175252282900746819600> [Mouse Down] Adj pos = 188 348 2017-05-25 04:28:59.07 : P! 20175252282900746819600> [Mouse Down] Cell = (2,5) 2017-05-25 04:28:59.07 : P! 20175252282900746819600> [Mouse Down] END This should not happen given it is basically within a bunch of Put_Line displaying variables... App.Game_log ("[Mouse Down] Event pos =" & Mouse_Event.X'Img & Mouse_Event.Y'Img); App.Game_log ("[Mouse Down] Canvas pos =" & App.My_Canvas.Position_Left'Img & App.My_Canvas.Position_Top'Img); App.Game_log ("[Mouse Down] Adj pos =" & App.Btn_Down_pix_x'Img & App.Btn_Down_pix_y'Img); App.Game_log ("[Mouse Down] Cell = " & Coord (App.Btn_Down_pos)); Variables, right ? Of course not!... The line with function calls Position_Left and Position_Top triggers two two-way information travels across the Atlantic... -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Touchscreen events ?
> I haven't tried it recently, but Mine Detector on gnoga.com works with a > touchscreen (or used to). Taps triggered the on-click handler. It's an area where logic seems to turn into magic. Anyway, a new version is running @ http://pasta.phyrama.com/ where the statistical proportion of reactive touchscreens should be larger... Enjoy! G. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Touchscreen events ?
Very wise idea. Actually in my own setting I am even more conservative: custom phyrama_boot.js as in previous post; custom phyrama_boot.html with call to phyrama_boot.js (and early jquery initialization): var gnoga_debug = true; Your browser must support JavaScript and be HTML 5 compilant to see this site. Le 23.05.2017 à 13:53, David Botton a écrit : > I would say to update boot.js but also copy the old one to to > something like boot_without_touch_events.js > > David Botton > > > On Tue, May 23, 2017 at 7:08 AM Gautier de Montmollin > mailto:gdem...@hotmail.com>> wrote: > > So, the workaround described here: > > > http://stackoverflow.com/questions/1517924/javascript-mapping-touch-events-to-mouse-events > > is working :-) > > Below, the completed boot.js (also with additional "Gnoga: " message > prefixes in the logs to js console). > --- > >var ws; >var adr; >var reconnects=0; >var params={}; >var gnoga={}; >var pingerid; > >if (typeof gnoga_debug == 'undefined') { > gnoga_debug = false; >} > >function Ping_ws() { > if (ws.readyState == 1) { > ws.send ("0"); > } >} > >function Shutdown_ws() { > ws = null; > clearInterval (pingerid); > if (gnoga['html_on_close'] != "") { > $(document.body).html(gnoga['html_on_close']); >} else { > alert ("Server connection lost " + event.reason); >} >} > >function Setup_ws() { > ws.onmessage = function (event) { > try { > if (gnoga_debug == true) { >console.log ("eval data = " + event.data); > } > eval (event.data); > } catch (e) { > console.error (e.message); > } > } > > ws.onerror = function (event) { > console.log ("onerror: reconnect"); > ws=null; > ws = new WebSocket (adr + "?Old_ID=" + > gnoga['Connection_ID']); > ws.onopen = function (event) { > console.log ("onerror: reconnect successful"); > Setup_ws(); > } > ws.onclose = function (event) { > console.log ("onerror: reconnect failure"); > Shutdown_ws(); > } > } > > ws.onclose = function (event) { > console.log ("onclose: reconnect"); > ws=null; > ws = new WebSocket (adr + "?Old_ID=" + > gnoga['Connection_ID']); > ws.onopen = function (event) { > console.log ("onclose: reconnect successful"); > Setup_ws(); > } > ws.onclose = function (event) { > console.log ("onclose: reconnect failure"); > Shutdown_ws(); > } > } >} > >function touchHandler(event) >{ >var touches = event.changedTouches, >first = touches[0], >type = ""; >switch(event.type) >{ >case "touchstart": type = "mousedown"; break; >case "touchmove": type = "mousemove"; break; >case "touchend": type = "mouseup"; break; >default: return; >} > >// initMouseEvent(type, canBubble, cancelable, view, > clickCount, >//screenX, screenY, clientX, clientY, ctrlKey, >//altKey, shiftKey, metaKey, button, > relatedTarget); > >var simulatedEvent = document.createEvent("MouseEvent"); >simulatedEvent.initMouseEvent(type, true, true, window, 1, > first.screenX, first.screenY, > first.clientX, first.clientY, > false, > false, false, false, > 0/*left*/, null); > >first.target.dispatchEvent(simulatedEvent); >event.preventDefault(); >} > >func
Re: [Gnoga-list] Touchscreen events ?
So, the workaround described here: http://stackoverflow.com/questions/1517924/javascript-mapping-touch-events-to-mouse-events is working :-) Below, the completed boot.js (also with additional "Gnoga: " message prefixes in the logs to js console). --- var ws; var adr; var reconnects=0; var params={}; var gnoga={}; var pingerid; if (typeof gnoga_debug == 'undefined') { gnoga_debug = false; } function Ping_ws() { if (ws.readyState == 1) { ws.send ("0"); } } function Shutdown_ws() { ws = null; clearInterval (pingerid); if (gnoga['html_on_close'] != "") { $(document.body).html(gnoga['html_on_close']); } else { alert ("Server connection lost " + event.reason); } } function Setup_ws() { ws.onmessage = function (event) { try { if (gnoga_debug == true) { console.log ("eval data = " + event.data); } eval (event.data); } catch (e) { console.error (e.message); } } ws.onerror = function (event) { console.log ("onerror: reconnect"); ws=null; ws = new WebSocket (adr + "?Old_ID=" + gnoga['Connection_ID']); ws.onopen = function (event) { console.log ("onerror: reconnect successful"); Setup_ws(); } ws.onclose = function (event) { console.log ("onerror: reconnect failure"); Shutdown_ws(); } } ws.onclose = function (event) { console.log ("onclose: reconnect"); ws=null; ws = new WebSocket (adr + "?Old_ID=" + gnoga['Connection_ID']); ws.onopen = function (event) { console.log ("onclose: reconnect successful"); Setup_ws(); } ws.onclose = function (event) { console.log ("onclose: reconnect failure"); Shutdown_ws(); } } } function touchHandler(event) { var touches = event.changedTouches, first = touches[0], type = ""; switch(event.type) { case "touchstart": type = "mousedown"; break; case "touchmove": type = "mousemove"; break; case "touchend": type = "mouseup"; break; default: return; } // initMouseEvent(type, canBubble, cancelable, view, clickCount, //screenX, screenY, clientX, clientY, ctrlKey, //altKey, shiftKey, metaKey, button, relatedTarget); var simulatedEvent = document.createEvent("MouseEvent"); simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0/*left*/, null); first.target.dispatchEvent(simulatedEvent); event.preventDefault(); } function touch2mouseinit() { document.addEventListener("touchstart", touchHandler, true); document.addEventListener("touchmove", touchHandler, true); document.addEventListener("touchend", touchHandler, true); document.addEventListener("touchcancel", touchHandler, true); } $( document ).ready(function() { var s = document.location.search; var tokens; var r = /[?&]?([^=]+)=([^&]*)/g; s = s.split("+").join(" "); while (tokens = r.exec(s)) { params[decodeURIComponent(tokens[1])] = decodeURIComponent(tokens[2]); } if (location.protocol == "https:") { adr = "wss://" + location.hostname; } else { adr = "ws://" + location.hostname; } if (location.port != "") { adr = adr + ":" + location.port; } adr = adr + "/gnoga"; try { console.log ("Gnoga: connecting to " + adr); ws = new WebSocket (adr); } catch (e) { console.log ("Gnoga: trying again, connecting to " + adr); ws = new WebSocket (adr); } if (ws != null) { ws.onopen = function (event) { console.log ("Gnoga: connection successful"); Setup_ws(); } pingerid = setInterval (function () {Ping_ws ();}, 1); } else { document.writeln ("Gnoga: if you are seeing this your browser or your connection to the internet is blocking websockets."); } touch2mouseinit(); console.log ("Gnoga: ready."); }); -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] How to check if an application is already connected?
Also had this case a few times - typically, with two versions of the same app: one running from GPS, one "standalone" I forgot to kill. It took me some time to realize the one in GPS was unresponsive because of the other one... Perhaps the question could be "is there a distracted-developer-protection feature" ;-) From: Pascal Sent: Monday, May 22, 2017 7:31:21 PM To: Gnoga support list Subject: Re: [Gnoga-list] How to check if an application is already connected? Hello David, In fact, I was wondering about the second application with nothing warns that a former application is running: Run a first Gnoga app in a terminal window: cmd$ bin/othello Gnoga:1.3-alpha Application root :/gnoga-code/ Executable at:/gnoga-code/bin/ HTML root:/gnoga-code/html/ Upload directory :/gnoga-code/upload/ Templates root :/gnoga-code/templates/ /js at :/gnoga-code/js/ /css at :/gnoga-code/css/ /img at :/gnoga-code/img/ Boot file:boot.html HTTP listen on ::8080 Press Ctrl-C to close server. 2017-05-22 21:24:35.14 : HTTP Server Started 2017-05-22 21:25:34.18 : New connection - ID 1 2017-05-22 21:25:35.14 : Ping on websocket - 1 Run a second Gnoga app in another terminal window: cmd$ bin/tic_tac_toe Gnoga:1.3-alpha Application root :/gnoga-code/ Executable at:/gnoga-code/bin/ HTML root:/gnoga-code/html/ Upload directory :/gnoga-code/upload/ Templates root :/gnoga-code/templates/ /js at :/gnoga-code/js/ /css at :/gnoga-code/css/ /img at :/gnoga-code/img/ Boot file:boot.html HTTP listen on ::8080 Press Ctrl-C to close server. 2017-05-22 21:26:41.16 : HTTP Server Started All further browser connections are going to the former app. How to display a warning that another app is running on the same connection? Thanks, Pascal. http://blady.pagesperso-orange.fr > Le 22 mai 2017 à 03:40, David Botton a écrit : > > I assume you are talking about a single connection application. I don't think > I built in anything to allow the currently running app to know there was an > attempt to connect again (should be easy to add). If multiple connection just > setup (in a task safe way) whatever mechanism you want atomic variable, etc. > or I think you recently added a count of currently live connections. > > David Botton > > > On Sun, May 21, 2017 at 1:58 PM Pascal wrote: > Hello, > > If a Gnoga application is already connected then if you run another Gnoga > application with the same connection then no error is logged. > > How to check that an other connection is already on? > > Thanks, Pascal. > http://blady.pagesperso-orange.fr > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Gnoga-list mailing list > Gnoga-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gnoga-list > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! > http://sdm.link/slashdot___ > Gnoga-list mailing list > Gnoga-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Experience with Amazon Web Services ?
When you are reaching the level 10 (the last so far), I should seriously begin to design the next n*10 ones ;-)... From: Anh (TA) Vo Sent: Sunday, May 21, 2017 5:14:21 PM To: Gnoga support list Subject: Re: [Gnoga-list] Experience with Amazon Web Services ? I have tried it. It was to my surprise, I completed the first level. I like this game so far. By the way, the sound worked great on Chrome and Firefox running on Ubuntu. Thank you very much for your work and willingness to share. Anh Vo On Sun, May 21, 2017 at 4:05 AM, Gautier de Montmollin mailto:gdem...@hotmail.com>> wrote: Surprisingly the game works now with Firefox. Something magic happened... > Do you mind I'll put a screen capture of Pasta on Source Forge Gnoga web page? In contrary, I'm very honored! It reminds me I should add a few credits on the "about" page... -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net<mailto:Gnoga-list@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Experience with Amazon Web Services ?
Surprisingly the game works now with Firefox. Something magic happened... > Do you mind I'll put a screen capture of Pasta on Source Forge Gnoga web page? In contrary, I'm very honored! It reminds me I should add a few credits on the "about" page... -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Experience with Amazon Web Services ?
There is now a permanent URL: http://pasta.phyrama.com/ The program is work in progress of course - first priority, availability of Gnoga for touchscreen devices... From: Gautier de Montmollin Sent: Saturday, May 20, 2017 8:37:08 AM To: Gnoga support list Subject: Re: [Gnoga-list] Experience with Amazon Web Services ? Thx! Regarding sounds, they are audible on: - Firefox 53.0.2 + Windows 7 - Chrome 58.0.3029.110 + Windows 7 The sound files are .ogg files. Not supported on your setup ? Or perhaps you have disabled sounds at some time ? In this case, the loudspeaker icon is barred by a red oblique line. Cheers Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Experience with Amazon Web Services ?
Thx! Regarding sounds, they are audible on: - Firefox 53.0.2 + Windows 7 - Chrome 58.0.3029.110 + Windows 7 The sound files are .ogg files. Not supported on your setup ? Or perhaps you have disabled sounds at some time ? In this case, the loudspeaker icon is barred by a red oblique line. Cheers Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Experience with Amazon Web Services ?
Here is an update - have fun! http://ec2-54-90-250-127.compute-1.amazonaws.com:8080/ NB: two known annoyances: - the server is located in Northern Virginia, USA, so, the farther away, the worse... - the touchscreen on Chrome and / or Android is not working -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Experience with Amazon Web Services ?
It's doing fine. The cool thing with AWS is that you can set up a new server in a few minutes, at one (or more) of some 20 places around the world. It is important for testing latency and (try to) remove bottlenecks. A nasty detail is that you need to check for each location which services are active. At the beginning you are not aware which ones you really need. About the game, player persistency, game level "mechanisms" are done. I hope launching a more permanent site very soon. Stay tuned... From: Jeffrey R. Carter Sent: Tuesday, May 16, 2017 8:09:58 PM To: gnoga-list@lists.sourceforge.net Subject: Re: [Gnoga-list] Experience with Amazon Web Services ? On 04/06/2017 07:08 PM, Gautier de Montmollin wrote: > You can have a glimpse there: > http://52.202.48.80:8080/ > > The address is temporary. You'll see that the game is in a very "drafty" > shape. > As expected there are some visual latency issues in the animations, > should be fixed soon. > Oh, the player persistence is *not* programmed yet. I was wondering how this was working for you, and if you have an update. -- Jeff Carter "Strange women lying in ponds distributing swords is no basis for a system of government." Monty Python & the Holy Grail 66 -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Simple edit box ?
Hello, Is there somewhere a simple edit box, which is *not* a web form: that is, just a box where you can edit a text, that does not redirect to another web page when the Enter key is pressed. TIA Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Simple edit box ?
Ok, got it: cf the chattanooga demo, search "Friend's e-mail" and code around it. The key is to prevent the web-like form submission by setting the appropriate handler: App.Friend_Form.On_Submit_Handler (Handler => On_Add'Access); ________ From: Gautier de Montmollin Sent: Tuesday, May 16, 2017 7:06:04 PM To: Gnoga support list Subject: Simple edit box ? Hello, Is there somewhere a simple edit box, which is *not* a web form: that is, just a box where you can edit a text, that does not redirect to another web page when the Enter key is pressed. TIA Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Modal dialog box
There is a small banana skin with the Create method: when I try to extend Gnoga.Gui.View.Modal_Dialog.Dialog_Type for containing its own buttons and other elements, like this: type Custom_Modal_Type is new Gnoga.Gui.View.Modal_Dialog.Dialog_Type with record Hide_Dlg_Bttn : Gnoga.Gui.Element.Common.Button_Type; end record; changing the App_Data like this: type App_Data (Main_Window : access Gnoga.Gui.Window.Window_Type'Class) is new Gnoga.Types.Connection_Data_Type with record Top_Level_View : Gnoga.Gui.View.View_Type; Modal : Custom_Modal_Type; Show_Dlg_Bttn : Gnoga.Gui.Element.Common.Button_Type; -- Add other controls here end record; (and the code around the inner button as following: App.Modal.Hide_Dlg_Bttn.Create (App.Modal, "Hide Dialog"); App.Modal.Hide_Dlg_Bttn.On_Click_Handler (On_Hide_Dlg_Click'Unrestricted_Access); ) then the Create method becomes ambiguous to GNAT (GPL 2016): App.Modal.Create (App.Main_Window.all); modal.adb:69:16: ambiguous call to "Create" modal.adb:69:16: possible interpretation (inherited) at line 17 modal.adb:69:16: possible interpretation (inherited) at line 17 My guess is that it hesitates between the Create in Gnoga.Gui.View.Modal_Dialog and the one in Gnoga.Gui.View. My fix #1 is to rename Create as Create_Modal. But I guess you want to prevent people using the Gnoga.Gui.View.Create for the modal dialogs. So my fix #2 is to define this public, overriding procedure Create (View : in out Dialog_Type; Parent : in out Gnoga.Gui.Base.Base_Type'Class; ID : in String := ""); then in the body, convert to Window_Type when needed: 11: Old_View : Gnoga.Gui.Base.Pointer_To_Base_Class := Gnoga.Gui.Window.Window_Type(Parent).Get_View; 18: Gnoga.Gui.Window.Window_Type(Parent).Set_View(Old_View.all); Comments ? Better ideas ? Cheers Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Modal dialog box
It looks very good. I'll test it with input boxes and so on... For making the testing easy for others, I've put a few lines around your test code so they can just compile it "out of the box" - just add "modal.adb" in test.gpr. Gautier Your daily dose of buzzwords: http://cbsg.sf.net --- with Gnoga.Application.Multi_Connect; with Gnoga.Gui.Window; with Gnoga.Gui.Base; with Gnoga.Gui.Element; with Gnoga.Gui.Element.Common; with Gnoga.Types; with Gnoga.Gui.View.Modal_Dialog; procedure Modal is use Gnoga; use Gnoga.Types; use Gnoga.Gui; use Gnoga.Gui.Element; type App_Data (Main_Window : access Gnoga.Gui.Window.Window_Type'Class) is new Gnoga.Types.Connection_Data_Type with record Top_Level_View : Gnoga.Gui.View.View_Type; Modal : Gnoga.Gui.View.Modal_Dialog.Dialog_Type; Show_Dlg_Bttn : Gnoga.Gui.Element.Common.Button_Type; Hide_Dlg_Bttn : Gnoga.Gui.Element.Common.Button_Type; -- Add other controls here end record; type App_Access is access all App_Data; procedure On_Show_Dlg_Click (Object : in out Gnoga.Gui.Base.Base_Type'Class) is App : constant App_Access := App_Access (Object.Connection_Data); begin App.Modal.Show; end On_Show_Dlg_Click; procedure On_Hide_Dlg_Click (Object : in out Gnoga.Gui.Base.Base_Type'Class) is App : constant App_Access := App_Access (Object.Connection_Data); begin App.Modal.Show (False); end On_Hide_Dlg_Click; -- This procedure is called each time a connection is made. procedure On_Connect (Main_Window : in out Gnoga.Gui.Window.Window_Type'Class; Connection : access Gnoga.Application.Multi_Connect.Connection_Holder_Type) is pragma Unreferenced (Connection); -- This is deallocated when the connection closes App : constant App_Access := new App_Data (Main_Window'Unchecked_Access); begin -- Associate App with this connection App.Main_Window.Connection_Data (App); -- Initialize Application Layout App.Top_Level_View.Create (Main_Window); App.Top_Level_View.Hidden; -- Hide initially until done App.Top_Level_View.Put_Line ("Hello World"); App.Show_Dlg_Bttn.Create (App.Top_Level_View, "Show Dialog"); App.Show_Dlg_Bttn.On_Click_Handler (On_Show_Dlg_Click'Unrestricted_Access); -- Configure your Modal Dialog here App.Modal.Create (App.Main_Window.all); App.Modal.Put_Line ("Modal Dialog"); App.Hide_Dlg_Bttn.Create (App.Modal, "Hide Dialog"); App.Hide_Dlg_Bttn.On_Click_Handler (On_Hide_Dlg_Click'Unrestricted_Access); -- Show Page App.Top_Level_View.Hidden (False); -- Do something end On_Connect; begin Application.Multi_Connect.Initialize (Boot => "debug.html"); Application.Multi_Connect.On_Connect_Handler (On_Connect'Unrestricted_Access, "default"); Application.Open_URL; Application.Title ("Test App for Gnoga"); Application.HTML_On_Close ("Connection to Application has been terminated"); Application.Multi_Connect.Message_Loop; end Modal; -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Touchscreen events ?
First attempt of patching Gnoga.Gui.Base for touchscreen events. To simplify things I concentrate events onto mouse events. Here are the changes and additions Touch_Event_Script : constant String := "(e.touches[0].clientX - e.target.getBoundingClientRect().left) + '|' + " & "(e.touches[0].clientY - e.target.getBoundingClientRect().top) + '|'"; procedure On_Mouse_Down_Handler (Object : in out Base_Type; Handler : in Mouse_Event) is begin if Object.On_Mouse_Down_Event /= null then Object.Unbind_Event ("mousedown"); Object.Unbind_Event ("touchstart"); end if; Object.On_Mouse_Down_Event := Handler; if Handler /= null then Object.Bind_Event (Event => "mousedown", Message => "", Script => Mouse_Event_Script); Object.Bind_Event (Event => "touchstart", Message => "", Script => Touch_Event_Script); end if; end On_Mouse_Down_Handler; ... elsif Event = "mousedown" or else Event = "touchstart" then Object.Fire_On_Mouse_Down (Parse_Mouse_Event (Message, Mouse_Down)); Now the problems are: The script Touch_Event_Script seems to crash - at least the event is not sent to GNOGA. If I use the Mouse_Event_Script instead, I get this: Error Parse_Mouse_Event converting to Integer (forced to 0). 2017-05-11 09:22:38.12 : raised CONSTRAINT_ERROR : bad input for 'Value: "NaN" 2017-05-11 09:22:38.13 : Full message = [NaN|NaN|undefined|undefined|0|false|false|false|false|] It seems that the e.clientX etc. are undefined (if I understand well, the idea is to track cases where several fingers are touching the screen, with e.touches[0]. e.touches[1], ...) Any clue how to make the Touch_Event_Script work ? TIA Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Modal dialog box
Hello, Is there somewhere a GNOGA modal dialog example with a string input field, a bit like this: https://jqueryui.com/dialog/#modal-form ? The rest of the GNOGA app would not be erased, but be temporarily ineffective - hence my request for a modal dialog, not switching to a new page. I guess we would best use the JQuery plugin, and perhaps an example is hidden in the various GNOGA examples. TIA Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Number of active connections
Thanks to Pascal there is now a function Active_Connections in Gnoga.Server.Connection, in the development branch. G. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Gnoga.Client.Storage: small improvement
Hi, In Gnoga.Client.Storage, the procedure Execute (Storage : in out Storage_Type'Class; Method : in String) then procedure Set (Storage : in out Storage_Type; Name, Value : String) can have the "in out" removed. It would solve nasty warnings such as: "Local" modified by call, but value never referenced in the last instruction of procedure Save_local_settings_data (App : in out Game_App_Data) is Local : Local_Storage_Type := Local_Storage (App.Main_Window.all); begin Local.Set ("Player_code", To_String (App.playing.player_code)); Local.Set ("Pasta_sounds", Boolean'Image (App.playing.sound)); end Save_local_settings_data; Cheers Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Gnoga.Gui.Screen's Width vs Window_Type's Width method
Hello, Perhaps the Width function in the Gnoga.Gui.Screen package would be better named Screen_Width ? Fortunately, Ada, as expected, knows it is confusing, in the case you "use" both Gnoga.Gui.Window and Gnoga.Gui.Screen: ambiguous expression (cannot resolve "Width") possible interpretation at gnoga-gui-screen.ads:44 possible interpretation at gnoga-gui-window.ads:56 Of course, same remark for Height. Cheers Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Touchscreen events ?
For the app I'm developing, a simple JS mapping of touch events to mouse events would be fine, as discussed here for instance: http://stackoverflow.com/questions/1517924/javascript-mapping-touch-events-to-mouse-events Then, hopefully, no need to change the GNOGA framework would be needed so far. But at which place should the JS code be invoked in the GNOGA app ? TIA G. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Experience with Amazon Web Services ?
That's it! > With Chromium I get a plate with little squares on it with pictures > of pasta. If I click on some of them it swaps the one I clicked on with > another > one a couple of times and barks. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Experience with Amazon Web Services ?
> I was curious as to what OS you chose. Windows 2016 Server Datacenter (sounds good, doesn't it ;-) ?) >> unzip the app_deploy.zip file in the server, start the executable - et >> voilà! > What about starting the executable automatically after a reboot, or if it > fails? Sure, it's possible. Normally you don't reboot the OS and usually the GNOGA executable is recovering from the worst situations, with some exceptions... >> You can have a glimpse there: >> >> http://52.202.48.80:8080/ > That loads indefinitely. Perhaps the program is not running. Something bad happened and it seems to have left the server in a lunatic state... OK restarted the executable. Hope you are luckier this time... -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Experience with Amazon Web Services ?
Le 06.04.2017 à 17:46, Jeffrey R. Carter a écrit : > On 04/06/2017 09:54 AM, Gautier de Montmollin wrote: >> - you need only the EC2 (Elastic Compute Cloud) service and nothing else >> (at least for starting...) > So you're using a free server? It's free for one year or until the traffic or CPU usage reaches a certain threshold. I intend to put an advertisement banner that could offset the costs (and perhaps more, who knows :-) ). > How is it configured? All done for you, basically you get a fully pre-installed server. > Where did you build your executable(s)? At home. Then I ship the needed files into a single Zip file made with this command: zipada -eps app_deploy bin/app_main.exe bin/persistence.db img/* html/* js/* Then, copy-paste to the server unzip the app_deploy.zip file in the server, start the executable - et voilà! > I'll look forward to seeing what you have when you make it public. You can have a glimpse there: http://52.202.48.80:8080/ The address is temporary. You'll see that the game is in a very "drafty" shape. As expected there are some visual latency issues in the animations, should be fixed soon. Oh, the player persistence is *not* programmed yet. Cheers Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Touchscreen events ?
> App.My_Canvas.On_Mouse_Move_Handler > (Touchscreen_Move'Unrestricted_Access); I meant: App.My_Canvas.On_Touchscreen_Move_Handler (Mouse_Move'Unrestricted_Access); of course :-) -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Touchscreen events ?
> It supports touchscreen events as they appear as mouse events. It was my assumption too... until I've tested it :-) . At least on the Samsung Tablet I've at reach, no mouse events are produced at all, be it with Chrome (v.57) or the default browser (Chrome as well, but v.44). So I'm afraid it will be necessary to support touchscreen events explicitly. Ideally both would be compatible, so you can just duplicate the handler setting, e.g.: App.My_Canvas.On_Mouse_Move_Handler (Mouse_Move'Unrestricted_Access); App.My_Canvas.On_Mouse_Move_Handler (Touchscreen_Move'Unrestricted_Access); Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Touchscreen events ?
Hello, GNOGA doesn't seem to support touchscreen events. Did I miss something ? Is anything in the works ? Otherwise I could give a try... Cheers Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Experience with Amazon Web Services ?
Thanks for the help, it works! Shockingly simple! For those who would like to set up an Amazon server for a GNOGA app, here is a summary that could help saving time (I spent hours reading forums with tons of complicated solutions and a few simple ones...): - you need only the EC2 (Elastic Compute Cloud) service and nothing else (at least for starting...) - you can just use the storage that is provided with an EC2 instance (no need to bother with S3, EBS, EFS, buckets, ...) - for opening access to the GNOGA Web app server (so yes, I had my "nothing happens, the server is running but is not visible from outside" moment), here are the steps: - from the EC2 Management Console, display the list with the instances and select the one you want to use as a server - in the Description tab, click on the active Security Group - for both Inbound and Outbound, add a custom TCP rule with port 8080 and IP address from the whole world (and even the universe ;-) ) - regarding Windows: - you can transfer your data with Copy-Paste through the Remote Desktop (here again, there are lots of more complicated solutions for transferring data...) - add your GNOGA executable in the firewall's list of "Allowed app and features" Cheers Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Suggestions for Spreadsheet-Like Display
You may want to port GWindows.Simple_Sheet. You'll notice the similarity between GWindows and GNOGA [?] G. ( https://sourceforge.net/p/gnavi/code/HEAD/tree/gwindows/contrib/gwindows-simple_sheet.ads https://sourceforge.net/p/gnavi/code/HEAD/tree/gwindows/contrib/gwindows-simple_sheet.adb ) From: Jeffrey R. Carter Sent: Tuesday, April 4, 2017 9:14:25 PM To: Gnoga support list Subject: [Gnoga-list] Suggestions for Spreadsheet-Like Display I'm wondering what to use to obtain a spreadsheet-like display. (No, I'm not writing a spreadsheet, but I want to display data that way.) I want something where the user can scroll through multiple rows and select an entire row by clicking anywhere in it. Each row consists of a number of columns, the same number for all rows, and a given column is the same width in all rows. I'd also like to be able to set the highlighted row from the program. The Selection_Type seems to have most of the capabilities I want: scroll through multiple rows, select an entire row, set the highlight. I don't see how to get the columns, though. It might be possible to do something with a Text_Area_Type, but it doesn't seem ideal. A Table_Type seems like the easiest way to get the columns, but seems to have some problems with the other features. Any suggestions? -- Jeff Carter "Every sperm is sacred." Monty Python's the Meaning of Life 55 -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Experience with Amazon Web Services ?
Thanks - although I'm a bit lost in the way... Actually I am looking for a very basic tutorial for a freshman who is trying to launch his first GNOGA server. For a while I need just HTTP, no HTTPS. To reduce the complexity of choosing which Linux flavour & version may end up working, I create a Windows instance. Which port should GNOGA listen to for connections ? 8080 or something else ? Is is just a question of copying the executable and the same needed files (the stuff in ./html, ./img, ./js) as for the local tests with localhost:8080 , and launching the executable (seems too simple to be true) ? Anything special to configure on the EC2 parameters ? Perhaps I should just try and see what happens or not. I kind of anticipate the "nothing happens" case: the server is running but is not visible from outside. TIA for any advice. Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Sprite as a button ?
Hello, Various mouse events are working well when handler is set on a Canvas. Now I'd like to have a button (purely graphical) with a captive On_Click handler. If I (mis-)use a sprite for that, the setting of the handler is accepted at compilation App.Sound_switch.On_Click_Handler (On_sound_switch_click'Unrestricted_Access); but seems ineffective. Probably I'm doing a Bad Thing. Would another kind of graphical object be better for the job, or is it more advisable to capture clicks on the whole canvas and locate eventual clicks in the button area (easy, but less elegant) ? TIA Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Setting up cookies ? Or getting device & user ID ?
Actually the issue between local and session storage (in test/storage.adb) isn't one: the last visit time displayed is a raw Unix time (looks like an ID) and the session ID contains a human-readable time, hence my confusion... G. From: Gautier de Montmollin Sent: Saturday, March 18, 2017 5:33:59 AM To: Gnoga support list Subject: Re: [Gnoga-list] Setting up cookies ? Or getting device & user ID ? > Look at the persistent storage example / test is far better way to go. Fantastic! No cookies needed then! I'm trying to figure out why the local / session keys are inverted when I run the storage test (both in IE and Chrome). It seems to happen on setting the keys' values: on inspection (in Chrome: F12, Application tab) the values appear at the wrong place. Any clue ? Cheers G. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Number of active connections
Thanks, It's good to know, but no rush: actually it is possible to guesstimate that number with the number of threads used by the application. If someone wonders about my question: knowing the number of active connections would be useful to know when to switch off a server executable (upon replacement by a newer version) without frustrating too many connected users. The version to be switched off knows (from a DB entry) that it should no accept new connections, so the active connections would progressively decrease, but there are probably usually a few dormant connections remaining. Thinking loud: eventually it would be even possible to start the new version before stopping the old one. For that, I guess the old app should be able to refuse connections, not even accept connections with a minimal "Maintenance mode" message. Cheers Gautier Le 25.03.2017 à 19:52, Pascal a écrit : > Hello Gautier, > > The connections are recorded in map Socket_Map encapsulated in protected > object Connection_Manager : > gnoga-server-connection.adb:913 > > Unfortunately there is no Connection_Manager function to return the length of > the map. > > But it could be if you need it. > > HTH, Pascal. > http://blady.pagesperso-orange.fr > > >> Le 21 mars 2017 à 10:44, Gautier de Montmollin a écrit >> : >> >> Hello, >> >> Is there a function to get the number of active connections ? >> >> I guess, if there isnt' one, it could be implemented with a global >> Natural with pragma Volatile, and *incrementing* it could be done upon >> connection, but how to do the *decrementing* properly ? >> >> For the latter, including a controlled type in the Connection_Data_Type >> record extension could do the job upon Finalize, but perhaps there is a >> less convoluted way. >> >> TIA >> >> Gautier >> >> -- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> ___ >> Gnoga-list mailing list >> Gnoga-list@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/gnoga-list > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Gnoga-list mailing list > Gnoga-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Number of active connections
Hello, Is there a function to get the number of active connections ? I guess, if there isnt' one, it could be implemented with a global Natural with pragma Volatile, and *incrementing* it could be done upon connection, but how to do the *decrementing* properly ? For the latter, including a controlled type in the Connection_Data_Type record extension could do the job upon Finalize, but perhaps there is a less convoluted way. TIA Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Setting up cookies ? Or getting device & user ID ?
Here is a version of storage.adb, a little more verbose, less GNAT warnings, and variable "Storage" renamed as "Local" (less confusing name); this doesn't solve the intervertion issue. -- 7d6 < with Gnoga.Gui.Element.Multimedia; 35c34 < App : App_Access := App_Access (Object.Connection_Data); --- > App : constant App_Access := App_Access (Object.Connection_Data); 48c47 < App : App_Access := App_Access (Object.Connection_Data); --- > App : constant App_Access := App_Access (Object.Connection_Data); 50c49 < Gnoga.Log ("On Storage"); --- > Gnoga.Log ("On Storage: storage data was changed in another session."); 52c51 < (To_String (Storage_Event.Name) & "=" & --- > (To_String (Storage_Event.Name) & " was =" & 54c53 <" now = " & To_String (Storage_Event.New_Value)); --- >", is now = " & To_String (Storage_Event.New_Value)); 67c66,67 < App : access App_Data := new App_Data; --- > pragma Unreferenced (Connection); > App : constant access App_Data := new App_Data; 69c69 < Storage : Gnoga.Client.Storage.Local_Storage_Type := --- > Local : Gnoga.Client.Storage.Local_Storage_Type := 87,88c87,88 < View.Put_Line ("Last access was at " & Storage.Get ("Last_View")); < Storage.Set --- > View.Put_Line ("Last access was at " & Local.Get ("Last_View")); > Local.Set 102,105c102,105 < Gnoga.Log ("Local len = " & Storage.Length'Img); < Gnoga.Log ("Session 1 = " & Session.Key (1)); < Gnoga.Log ("Local 1 = " & Storage.Key (1)); < Gnoga.Log ("END"); --- > Gnoga.Log ("Local len = " & Local.Length'Img); > Gnoga.Log ("Session 1 = " & Session.Key (1) & ", Value = " & Session.Get (Session.Key (1))); > Gnoga.Log ("Local 1 = " & Local.Key (1) & ", Value = " & Session.Get (Local.Key (1))); > Gnoga.Log ("END On_Connect"); -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Setting up cookies ? Or getting device & user ID ?
> Look at the persistent storage example / test is far better way to go. Fantastic! No cookies needed then! I'm trying to figure out why the local / session keys are inverted when I run the storage test (both in IE and Chrome). It seems to happen on setting the keys' values: on inspection (in Chrome: F12, Application tab) the values appear at the wrong place. Any clue ? Cheers G. -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Setting up cookies ? Or getting device & user ID ?
Hi again, This time I'm interested in setting up cookies. Any experience, snippet around ? Alternatively, it would be also fine to just to obtain a unique identifier per client device & user. The idea is to have a sort of auto login when a user comes back to the site. TIA __ Gautier's Ada programming -- http://gautiersblog.blogspot.com/search/label/Ada -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Experience with Amazon Web Services ?
Hello! Did anyone deploy a GNOGA app on Amazon Web Services (more precisely Amazon Cloud service, https://aws.amazon.com/ec2/ ) ? Any advice, caveat, feedback ? TIA __ Gautier's Ada programming -- http://gautiersblog.blogspot.com/search/label/Ada -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Leaves: a match-3 game for GNOGA with PIXI
Hello, The development branch (1.3) has a new demo, "leaves", using the new PIXI plugin by Pascal. It is the base mechanism of a match-3-style game - the kind of game where you cannot stop aligning fruits, candies, or peppers... In this case, it's leaves of different plants. Enjoy! Gautier -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Custom resource path
Hello, It seems indeed hardcoded: I've searched "/js" with GPS and found it hardcoded in a few plugins, then, in Gnoga.Server.Connection: if Verbose then Write_To_Console ("Gnoga:" & Gnoga.Version); Write_To_Console ("Application root :" & Application_Directory); Write_To_Console ("Executable at:" & Executable_Directory); Write_To_Console ("HTML root:" & HTML_Directory); Write_To_Console ("Upload directory :" & Upload_Directory); Write_To_Console ("Templates root :" & Templates_Directory); Write_To_Console ("/js at :" & JS_Directory); Write_To_Console ("/css at :" & CSS_Directory); Write_To_Console ("/img at :" & IMG_Directory); (...) which refers to function JS_Directory return String is begin return Find_Subdirectory ("js"); end JS_Directory; Is it an issue ? -- Announcing the Oxford Dictionaries API! The API offers world-renowned dictionary content that is easy and intuitive to access. Sign up for an account today to start using our lexical data to power your apps and projects. Get started today and enter our developer competition. http://sdm.link/oxford ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Sound FX's and music
Ding! Perfect! From: Jeffrey R. Carter Sent: Wednesday, March 8, 2017 4:53:05 PM To: gnoga-list@lists.sourceforge.net Subject: Re: [Gnoga-list] Sound FX's and music On 03/08/2017 04:12 AM, Gautier de Montmollin wrote: Is it possible to play short sounds on command, and have a background music, in a GNOGA app ? Just curious... You'll notice that the Chattanooga demo plays a brief sound when a message arrives. The same mechanism should do what you want. -- Jeff Carter "I would never want to belong to any club that would have someone like me for a member." Annie Hall 41 -- Announcing the Oxford Dictionaries API! The API offers world-renowned dictionary content that is easy and intuitive to access. Sign up for an account today to start using our lexical data to power your apps and projects. Get started today and enter our developer competition. http://sdm.link/oxford___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Sound FX's and music
Hello, Is it possible to play short sounds on command, and have a background music, in a GNOGA app ? Just curious... Gautier -- Announcing the Oxford Dictionaries API! The API offers world-renowned dictionary content that is easy and intuitive to access. Sign up for an account today to start using our lexical data to power your apps and projects. Get started today and enter our developer competition. http://sdm.link/oxford___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Chattanooga duplicate user
Cool! Thinking loud: it could be nice to combine the chat and the snake demos to have a multi-user snake demo :-) ... G. From: Jeffrey R. Carter Sent: Tuesday, February 14, 2017 5:58:25 PM To: gnoga-list@lists.sourceforge.net Subject: Re: [Gnoga-list] Chattanooga duplicate user On 02/14/2017 03:14 PM, Gautier de Montmollin wrote: I can figure out why, but on the Chattanooga demo, you can connect twice (or more) with the same user ID, although On_Connect_Submit seemingly should issue a Email & " is already connected. Try again." message. Any clue why ? You can check this behavior on the http://chat.gnoga.com or on the version in ./demo/chattanooga . This is because DB.Add is called too late, and the field for the error msg no longer exists. DB.Add should be the 1st thing after the if. I'll have a fix available in a few days. -- Jeff Carter "Mr. President, we must not allow a mine-shaft gap!" Dr. Strangelove 33 -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Chattanooga duplicate user
Hello, I can figure out why, but on the Chattanooga demo, you can connect twice (or more) with the same user ID, although On_Connect_Submit seemingly should issue a Email & " is already connected. Try again." message. Any clue why ? You can check this behavior on the http://chat.gnoga.com or on the version in ./demo/chattanooga . G. -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] PIXI support with sprites.
Hi Pascal, The version of make.exe is the following: make -v GNU Make version 3.79.1, by Richard Stallman and Roland McGrath. Built for mingw32 Copyright (C) 1988, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 2000 I think it's the latest available @ libre.adacore.com "make gnoga" gives the following output: gprbuild -p --target=i686-pc-mingw32 -P src/gnoga.gpr -XPRJ_TARGET=Windows -XAtomic_Access=GCC-long-offsets process_begin: CreateProcess((null), pwd, ...) failed. process_begin: CreateProcess((null), pwd, ...) failed. auto.cgpr:9:08: undefined attribute "runtime_source_dirs" auto.cgpr:11:08: undefined attribute "object_lister" auto.cgpr:12:08: undefined attribute "object_lister_matcher" auto.cgpr:86:11: undefined attribute "export_file_format" auto.cgpr:87:11: undefined attribute "export_file_switch" gprbuild: processing of configuration project "[gnoga]\src\..\obj\auto.cgpr" failed make: *** [gnoga] Error 4 Anyway, the solution with the batch file is working so I don't really need "make" in this context, it works without it [??] BTW, the INSTALL file doesn't mention "make gnoga" but only "make install" and "make release". Anyway, it mentions too: "Gnoga _does not_ require installation, it is a convenience feature." [??] Cheers Gautier From: Pascal Sent: Monday, February 13, 2017 8:59:37 PM To: Gnoga support list Subject: Re: [Gnoga-list] PIXI support with sprites. Hello Gautier, I'm happy to see you finally got it. Well, points 1 and 2 should be automatically done by the Makefile. Just type in Gnoga root directory: $ make gnoga $ make tests Moreover the Makefile sets some environnement options specific to your platform, copies Ada and Javascript files... That's why make_on_windows.bat is no longer existing. Is your system provided GNU make utilities? On macOS it comes with: cmd$ make -v GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for i386-apple-darwin11.3.0 What is yours? If Makefile don't work as expected please send output. Other Windows users feedbacks are welcome. 8080 : good point, it should be added in documentation. I didn't know http://slither.io, it's cute ;-) I'd like Gnoga to allow to be able to program something like that. HTH, Pascal. http://blady.pagesperso-orange.fr > Le 13 févr. 2017 à 16:38, Gautier de Montmollin a écrit > : > > Now the pixi sprites: > > 1) In test.gpr, >for Source_Dirs use ("."); > needs to be changed to: >for Source_Dirs use (".", "../components/pixi/src"); > Or perhaps the files will be moved to the main "src" directory at some point ? > > 2) Something obvious but that could disturb a newcomer: pixi.js needs to be > copied to the main "js" directory. > > Then: the demo is working - a (positive) can of worms is now open! Speaking > of worms: do you know http://slither.io/ ? > > slither.io > slither.io > The smash-hit game! Play with millions of players around the world and try to > become the longest of the day! > > From: Gautier de Montmollin > Sent: Monday, February 13, 2017 3:01:11 PM > To: Gnoga support list > Subject: Re: [Gnoga-list] PIXI support with sprites. > > I'm testing 1.3 as a real "freshman" - I even had to google how to get to the > 8080 port in a browser! > > Read carefully the steps below, it will be useful to fix the missing bits in > the installation. > > 0) Warm-up: gnoga 1.1a release (the "solid ground"): I run > make_on_windows.bat and there is a working snake.exe at the end. > 1) Git-ball of 1.3, unzipped. I copy make_on_windows.bat from gnoga 1.1a > (hint here: it should be added in the git repository) > 2) I run make_on_windows.bat, 1st error: > gnoga.gpr:2:06: unknown project file: "lib_components.gpr" > Fix: replace: > with "lib_components.gpr" > by: > with "../deps/simple_components/lib_components.gpr" > 3) Retry: lib & obj directories not found -> after some trial & error, the > following lines had to be added to make_on_windows.bat: > if not exist deps\simple_components\obj\components\static mkdir > deps\simple_components\obj\components\static > if not exist deps\simple_components\lib\components\static mkdir > deps\simple_components\lib\components\static > 4) Retry: snake.exe is there and is working! > > Now, cannot wait to test the sprites - thanks Pascal! > > Cheers > Gautier > From: Pascal > Sent: Saturday, Februa
Re: [Gnoga-list] PIXI support with sprites.
Now the pixi sprites: 1) In test.gpr, for Source_Dirs use ("."); needs to be changed to: for Source_Dirs use (".", "../components/pixi/src"); Or perhaps the files will be moved to the main "src" directory at some point ? 2) Something obvious but that could disturb a newcomer: pixi.js needs to be copied to the main "js" directory. Then: the demo is working - a (positive) can of worms is now open! Speaking of worms: do you know http://slither.io/ ? [http://slither.io/s/fbthumb3.jpg]<http://slither.io/> slither.io<http://slither.io/> slither.io The smash-hit game! Play with millions of players around the world and try to become the longest of the day! From: Gautier de Montmollin Sent: Monday, February 13, 2017 3:01:11 PM To: Gnoga support list Subject: Re: [Gnoga-list] PIXI support with sprites. I'm testing 1.3 as a real "freshman" - I even had to google how to get to the 8080 port in a browser! Read carefully the steps below, it will be useful to fix the missing bits in the installation. 0) Warm-up: gnoga 1.1a release (the "solid ground"): I run make_on_windows.bat and there is a working snake.exe at the end. 1) Git-ball of 1.3, unzipped. I copy make_on_windows.bat from gnoga 1.1a (hint here: it should be added in the git repository) 2) I run make_on_windows.bat, 1st error: gnoga.gpr:2:06: unknown project file: "lib_components.gpr" Fix: replace: with "lib_components.gpr" by: with "../deps/simple_components/lib_components.gpr" 3) Retry: lib & obj directories not found -> after some trial & error, the following lines had to be added to make_on_windows.bat: if not exist deps\simple_components\obj\components\static mkdir deps\simple_components\obj\components\static if not exist deps\simple_components\lib\components\static mkdir deps\simple_components\lib\components\static 4) Retry: snake.exe is there and is working! Now, cannot wait to test the sprites - thanks Pascal! Cheers Gautier From: Pascal Sent: Saturday, February 11, 2017 10:52:57 AM To: Gnoga support list Subject: [Gnoga-list] PIXI support with sprites. Hello, I've pushed on dev_1.3 branch some support to PIXI javascript library (https://github.com/pixijs/pixi.js). This 2D graphic lib comes with sprites. It's a very first version commited to request comments, tested API are included in test/pixi_sprite_test.adb. Feel free to send code review: https://sourceforge.net/p/gnoga/code/ci/dev_1.3/tree/components/pixi/src/ Next steps will be on texture support. PIXI is wide, I'll add API step by step, feel free to point out some API you want to be available. A short clip (60 s) featuring Gnoga mascots is on Orange cloud: https://share.orange.fr/#TJET1aIfpf19a973b407 Regards, Pascal. http://blady.pagesperso-orange.fr -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] PIXI support with sprites.
I'm testing 1.3 as a real "freshman" - I even had to google how to get to the 8080 port in a browser! Read carefully the steps below, it will be useful to fix the missing bits in the installation. 0) Warm-up: gnoga 1.1a release (the "solid ground"): I run make_on_windows.bat and there is a working snake.exe at the end. 1) Git-ball of 1.3, unzipped. I copy make_on_windows.bat from gnoga 1.1a (hint here: it should be added in the git repository) 2) I run make_on_windows.bat, 1st error: gnoga.gpr:2:06: unknown project file: "lib_components.gpr" Fix: replace: with "lib_components.gpr" by: with "../deps/simple_components/lib_components.gpr" 3) Retry: lib & obj directories not found -> after some trial & error, the following lines had to be added to make_on_windows.bat: if not exist deps\simple_components\obj\components\static mkdir deps\simple_components\obj\components\static if not exist deps\simple_components\lib\components\static mkdir deps\simple_components\lib\components\static 4) Retry: snake.exe is there and is working! Now, cannot wait to test the sprites - thanks Pascal! Cheers Gautier From: Pascal Sent: Saturday, February 11, 2017 10:52:57 AM To: Gnoga support list Subject: [Gnoga-list] PIXI support with sprites. Hello, I've pushed on dev_1.3 branch some support to PIXI javascript library (https://github.com/pixijs/pixi.js). This 2D graphic lib comes with sprites. It's a very first version commited to request comments, tested API are included in test/pixi_sprite_test.adb. Feel free to send code review: https://sourceforge.net/p/gnoga/code/ci/dev_1.3/tree/components/pixi/src/ Next steps will be on texture support. PIXI is wide, I'll add API step by step, feel free to point out some API you want to be available. A short clip (60 s) featuring Gnoga mascots is on Orange cloud: https://share.orange.fr/#TJET1aIfpf19a973b407 Regards, Pascal. http://blady.pagesperso-orange.fr -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Project for someone
Cool! This depends - again - on a project for someone else (or perhaps the same...) : provide a simple example of a sprite with GNOGA. If you Google "sprite html5" you get plenty of examples, even complete games. So I guess it is possible, but how exactly ?... Cheers Gautier From: Pascal Sent: Sunday, November 13, 2016 5:52:22 PM To: Gnoga support list Subject: Re: [Gnoga-list] Project for someone Hello, FYI, XBoard a graphical user interface in GTK for AdaChess may be useful for some graphics materials: https://www.gnu.org/software/xboard and source code: http://ftp.gnu.org/gnu/xboard HTH, Pascal. http://blady.pagesperso-orange.fr > Le 8 nov. 2016 à 22:32, David Botton a écrit : > > http://adachess.com > > Someone interested in writing a front end for AdaChess in Gnoga, shouldn't be > too hard. > > David Botton -- Developer Access Program for Intel Xeon Phi Processors Access to Intel Xeon Phi processor-based developer platforms. With one year of Intel Parallel Studio XE. Training and support from Colfax. Order your platform today. http://sdm.link/xeonphi ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list -- ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Sprites with GNOGA
Sounds good - but a bit abstract to me. No clue where to start from... Is there any mini-demo like a bouncing smiley, a bit like you have for GWindows ? From: David Botton Sent: Sunday, October 30, 2016 12:18:19 AM To: Gnoga support list Subject: Re: [Gnoga-list] Sprites with GNOGA I think the larger gross movements of a gif sprite can reasonably done in most cases. On Sat, Oct 29, 2016 at 8:24 AM Gautier de Montmollin mailto:gdem...@hotmail.com>> wrote: Good idea! But regarding the movement of the sprites - is there a way to place them pixel-wise and let them move (I guess it would be reasonable if the server were not controlling each subpixel movement) ? Gautier -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET<http://ASP.NET> CLI. Get your free copy! http://sdm.link/telerik ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net<mailto:Gnoga-list@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/gnoga-list -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] Sprites with GNOGA
Good idea! But regarding the movement of the sprites - is there a way to place them pixel-wise and let them move (I guess it would be reasonable if the server were not controlling each subpixel movement) ? Gautier -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
[Gnoga-list] Sprites with GNOGA
I was wondering if it was possible to display sprites with a proper bitmap and perhaps a smooth animation. Just considering a Breakout-like, Tetris-like or the likes of games @ http://www.king.com (Candy Crush and so). Doable with GNOGA ? Or would it be too demanding in terms of client-server communication ? Gautier -- The Command Line: Reinvented for Modern Developers Did the resurgence of CLI tooling catch you by surprise? Reconnect with the command line and become more productive. Learn the new .NET and ASP.NET CLI. Get your free copy! http://sdm.link/telerik___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] URL decoder.
Not sure if it is helpful, but you may find useful bits in Wasabee.URL : http://sf.net/p/wasabee/code/HEAD/tree/zrt_dev/common/wasabee-url.ads Cheers _ Gautier's Ada programming http://gautiersblog.blogspot.com/search/label/Ada -- ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list
Re: [Gnoga-list] First steps with Gnoga
Hello, > Hm probably missing a lot of information about how a gui works. Didn't look at your issue, but I can confirm that it takes quite some time to sort out how any GUI is working. Basically your pieces of code communicate with a black box whose you need to guess the behaviour. Mutatis mutandis (from experience with GWindows, the ancestor of Gnoga, and other UI systems), there are a few questions to sort out: Is the form closed when you send the data through OK ? In this case, you may want to reopen it over and over when you detect an erroneous data - loop needed there. I do it with GWindows and see also web forms doing that (marking in red the errors). If you can analyse the data entered in each field before sending the form it is even better (saw some Gnoga demos doing that IIRC). Good luck! Gautier -- ___ Gnoga-list mailing list Gnoga-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gnoga-list