[Gambas-devel] Application.Busy (gambas2-1.9.43)

Benoit Minisini gambas at ...1...
Sat Sep 23 23:35:54 CEST 2006


On Saturday 23 September 2006 22:49, Charlie Reinl wrote:
> Am Samstag, den 23.09.2006, 21:37 +0200 schrieb Benoit Minisini:
> > On Saturday 23 September 2006 20:45, Charlie Reinl wrote:
> > > Salut Benoît,
> > >
> > > Application.Busy INC and DEC works fine, ... BUT
> > >
> > > If by any reason the DEC ditn't arrive, the next INC work like every
> > > INC, but the next DEC is the first INC.
> > >
> > > INC Application.Busy	(0 + 1 = 1)
> > > DEC Application.Busy (1 - 1 = 0) ' but not reached so stays 1
> > > INC Application.Busy	(1 + 1 = 2)
> > > DECApplication.Busy	(2 - 1 = 1)
> > >
> > > This can happend if you work with processes.
> > >
> > > I Think Application.Busy= true and Application.Busy=False would be
> > > better.
> > >
> > > I know I can set it to 0, before make an INC Application.Busy, but
> > > thats 2 lines !
> > >
> > > Amicalment
> > > Charlie
> >
> > Application.Busy needs to be an integer, otherwise you cannot imbricate
> > code that needs to show a busy cursor.
> >
> > Regards,
>
> Salut Benoît,
>
> like my example above shows, if something wnet wrong, you need 2 lines
> to correct that, set Application.Busy = 0 and than INC Application.Busy.
>
> So, as you can't always be sure that the DEC Application.Busy is fired,

You can be sure, by using FINALLY.

-- 
Benoit Minisini





More information about the Devel mailing list