From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.50.50.71 with SMTP id a7mr1727535igo.5.1413242944763; Mon, 13 Oct 2014 16:29:04 -0700 (PDT) X-Received: by 10.140.84.21 with SMTP id k21mr21062qgd.6.1413242944734; Mon, 13 Oct 2014 16:29:04 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!uq10no10186642igb.0!news-out.google.com!i10ni86qaf.0!nntp.google.com!s7no2545290qap.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 13 Oct 2014 16:29:04 -0700 (PDT) In-Reply-To: <32414aa2-3a0f-41fc-aef3-d8db709aacfc@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=108.44.225.195; posting-account=vk6_JwoAAABkMyHO1YfdP69Hm3CpbdGR NNTP-Posting-Host: 108.44.225.195 References: <13fb4505-4abd-4d5b-b18d-d05aa0a4dcb9@googlegroups.com> <32414aa2-3a0f-41fc-aef3-d8db709aacfc@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0b5ee58b-2d2d-4394-8215-0fa5d1a4740e@googlegroups.com> Subject: Re: Gnoga Latest Updates From: Jeremiah Injection-Date: Mon, 13 Oct 2014 23:29:04 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:22434 Date: 2014-10-13T16:29:04-07:00 List-Id: On Monday, October 13, 2014 5:12:46 PM UTC-4, David Botton wrote: > > Question: Is there currently or will there be a way to tell when the >=20 > > user closes the browser window or navigates to a different URL? >=20 >=20 >=20 > There are a few ways, the simplest is in the On_Connect procedure use Con= nection.Hold at the end, if the connection is lost the semaphore will relea= se and you can add clean up code there before anything finalizes on its own= . >=20 >=20 >=20 > > > I am using Tutorial 2 as base example for this, but when a user does >=20 > > > the following: >=20 >=20 >=20 > Remember Tutorial 2 is using a "Singleton" model, one time run. Good for = tools and single runs from the command line, etc. >=20 >=20 >=20 > If you leave the page it will always close the connection on a singleton = permanently. It should close the application as well. I'll double check to = make sure that is the case. >=20 >=20 >=20 > You should consider basing off of one of the later multi_connect tutorial= s if you think more than one connection will exists or running on the inter= net. See the snake demo for a full example. >=20 >=20 >=20 > David Botton I'll check out multi connect, though my use case would be a single connect = one (making applications for a single desktop user), so I would need to mak= e a multi connect act like a singleton (I can do this though), but that doe= s feel weird to me. I chose singleton because it fits what I need at a gla= nce. =20 The main thing is if I close the browser window, then in my code Gnoga.Appl= ication.Singleton.Message_Loop still hangs as if it is waiting. I assume b= ecause Gnoga.Application.Singleton.End_Application isn't called, but I have= not found a way to figure out "when" to call that since I don't have a way= of telling when the browser closes or navigates to a different page. I di= d not check multi connect but I can play with that as well and see, though = I would have assumed Connection.Hold acted the same way as Gnoga.Applicatio= n.Singleton.Message_Loop in terms of how it locked/unlocked. I definitely will look at multiconnect for some projects I have, but I stil= l want to make sure I have some applications for my coworkers to use in our= lab (configure some devices). I just have to make sure they aren't having= to do stuff at the command prompt if I can avoid it.