[Gambas-user] "mutex" applications

Bruce bbruen at ...2308...
Thu Jun 7 04:55:34 CEST 2012


On Thu, 2012-06-07 at 12:09 +0930, Bruce wrote:
> On Wed, 2012-06-06 at 21:49 -0400, nando wrote:
> > I'd like to suggest a form property called 'Singleton'
> > when _new or _init is called (whichever creates the object)
> > then it will not create a second and only
> > return the first instance of it.  Somewhat like a module.
> 
> nando,
> 
> That is quite easy to implement (for forms and any class) using a static
> boolean set true in the _Init() method and checked in the _New() method.
> 
> This is a different thing altogether, I am trying to ensure that only
> one instance of an application is running.
> 
> regards
> Bruce
> 
Sorry that's both checked and set in the _new() method.
(Can't think on two things at once.)
B 





More information about the User mailing list