Re: [Gambas-devel] Application.Busy (gambas2-1.9.43)
Brought to you by:
gambas
From: Benoit M. <ga...@us...> - 2006-09-23 21:28:07
|
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=C3=AEt, > > > > > > 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 =3D 1) > > > DEC Application.Busy (1 - 1 =3D 0) ' but not reached so stays 1 > > > INC Application.Busy (1 + 1 =3D 2) > > > DECApplication.Busy (2 - 1 =3D 1) > > > > > > This can happend if you work with processes. > > > > > > I Think Application.Busy=3D true and Application.Busy=3DFalse 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=C3=AEt, > > like my example above shows, if something wnet wrong, you need 2 lines > to correct that, set Application.Busy =3D 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. =2D-=20 Benoit Minisini |