Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-25 Thread Benoît Minisini
 I use
 
 INC Application.Busy
 
 and
 
 DEC Application.Busy
 
 in my applications on Debian Lenny (with LXDE)
 and Gambas 2.21 and it works just fine.
 
 Regards,
 Dimitris
 
 On Wed, Nov 24, 2010 at 9:23 PM, vikram austin...@yahoo.com wrote:
   Setting FMain.Mouse and calling WAIT is useless. Application.Busy
   should already set the busy cursor for every widget in the
   application.
  
  Otherwise
  
   this is a bug.
  
  Application.Busy alone is not showing a busy pointer on Debian Squeeze,
  with Gambas 2.21.
  
  Regards,
  Vikram
  
  

I see: with gb.gtk, Application.Busy  0 works only if the event loop is run 
just after (i.e. you call WAIT just after INC Application.Busy).

No idea why, I will look at that...

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-24 Thread vikram
Hi,

Heres how i fixed it, hope it is the right way to display a wait cursor 
while a process executes.

-
FMain.Mouse = Mouse.Wait
WAIT 
Application.Busy = 1

SHELL sha512sum lenny.iso TO actualSUM

Application.Busy = 0
FMain.Mouse = Mouse.Default
-

I read If you call WAIT from an event handler, you may create infinite 
recursions, and then stack overflows from the Docs, i hope it wouldn't be an 
issue in this case (i.e., if i were to use WAIT for the click event of a 
Button).

Regards,
Vikram


  
--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-24 Thread Benoît Minisini
 Hi,
 
 Heres how i fixed it, hope it is the right way to display a wait cursor
 while a process executes.
 
 -
 FMain.Mouse = Mouse.Wait
 WAIT
 Application.Busy = 1
 
 SHELL sha512sum lenny.iso TO actualSUM
 
 Application.Busy = 0
 FMain.Mouse = Mouse.Default
 -
 
 I read If you call WAIT from an event handler, you may create infinite
 recursions, and then stack overflows from the Docs, i hope it wouldn't be
 an issue in this case (i.e., if i were to use WAIT for the click event of
 a Button).
 
 Regards,
 Vikram
 

Setting FMain.Mouse and calling WAIT is useless. Application.Busy should 
already set the busy cursor for every widget in the application. Otherwise 
this is a bug.

Regards,

-- 
Benoît Minisini

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-24 Thread Ron
On 24-11-2010 12:09, Benoît Minisini wrote:
 Hi,

 Heres how i fixed it, hope it is the right way to display a wait cursor
 while a process executes.

 -
 FMain.Mouse = Mouse.Wait
 WAIT
 Application.Busy = 1

 SHELL sha512sum lenny.iso TO actualSUM

 Application.Busy = 0
 FMain.Mouse = Mouse.Default
 -

 I read If you call WAIT from an event handler, you may create infinite
 recursions, and then stack overflows from the Docs, i hope it wouldn't be
 an issue in this case (i.e., if i were to use WAIT for the click event of
 a Button).

 Regards,
 Vikram

 Setting FMain.Mouse and calling WAIT is useless. Application.Busy should
 already set the busy cursor for every widget in the application. Otherwise
 this is a bug.

 Regards,


That was what I thought too, but Application.Busy alone is not showing a 
busy pointer (anymore?) on latest gambas 2 and Ubuntu 10.04 with gb.qt

Regards,
Ron_2nd.

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-24 Thread vikram
 Setting FMain.Mouse and calling WAIT is useless. Application.Busy should 
 already set the busy cursor for every widget in the application. Otherwise 
 this is a bug.
Application.Busy alone is not showing a busy pointer on Debian Squeeze, with 
Gambas 2.21.

Regards,
Vikram



  
--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-24 Thread Dimitris Anogiatis
I use

INC Application.Busy

and

DEC Application.Busy

in my applications on Debian Lenny (with LXDE)
and Gambas 2.21 and it works just fine.

Regards,
Dimitris


On Wed, Nov 24, 2010 at 9:23 PM, vikram austin...@yahoo.com wrote:

  Setting FMain.Mouse and calling WAIT is useless. Application.Busy should
  already set the busy cursor for every widget in the application.
 Otherwise
  this is a bug.
 Application.Busy alone is not showing a busy pointer on Debian Squeeze,
 with Gambas 2.21.

 Regards,
 Vikram





 --
 Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
 Tap into the largest installed PC base  get more eyes on your game by
 optimizing for Intel(R) Graphics Technology. Get started today with the
 Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
 http://p.sf.net/sfu/intelisp-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-23 Thread Laurent Carlier
Le mardi 23 novembre 2010 11:45:47, vikram a écrit :
 Hi,
 
 How do i display a wait cursor while a process is running? I have tried
 using
 
 ME.mouse = Mouse.Wait
 
 without much luck.
 
 Heres a code snippet:
 
   ME.mouse = Mouse.Wait
   Application.Busy = 1
 
   command = sha512sum   filePath  |awk '{print $1}' 
   SHELL command TO checksum
 
   checksum = Left(checksum, Len(checksum) - 1) 'strip \n
   txta_checksum.Text = checksum
 
   Application.busy = 0
   ME.Mouse = Mouse.DEFAULT
 
 
 I am using Gambas 2.21.
 
 Thanks,
 Vikram
 

You can use the Wait keyword, see http://gambasdoc.org/help/lang/shell

Something like:
SHELL command Wait TO checksum

++

--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-23 Thread vikram
You can use the Wait keyword, see http://gambasdoc.org/help/lang/shell

Something like:
SHELL command Wait TO checksum

Thanks for the quick reply. Adding WAIT to the SHELL command is not causing the 
mouse cursor to change to Mouse.Wait :(

Regards,
Vikram



  
--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-23 Thread Ron
Strange, this simply works here:

' Gambas class file

PUBLIC SUB Form_Open()

END

PUBLIC SUB Form_Activate()

   DIM Checksum AS String

   ME.Mouse = Mouse.Wait
   Application.Busy = TRUE

   SHELL ls -lR TO checksum

   Application.Busy = FALSE
   ME.Mouse = Mouse.DEFAULT

   'PRINT checksum

END

Gambas 2.21.x, ubuntu 10.4, gb.qt

Regards,
Ron_2nd.

 You can use the Wait keyword, see http://gambasdoc.org/help/lang/shell
 Something like:
 SHELL command Wait TO checksum
 Thanks for the quick reply. Adding WAIT to the SHELL command is not causing 
 the mouse cursor to change to Mouse.Wait :(

 Regards,
 Vikram




 --
 Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
 Tap into the largest installed PC base  get more eyes on your game by
 optimizing for Intel(R) Graphics Technology. Get started today with the
 Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
 http://p.sf.net/sfu/intelisp-dev2dev
 ___
 Gambas-user mailing list
 Gambas-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/gambas-user


--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Displaying Mouse.Wait while running a SHELL Command

2010-11-23 Thread vikram
Hi, 

heres a sample program.

iam running sha512sum on file which are 100MB+ in size, its takes around 5 
seconds. right now the button stays depressed until the hash has been displayed.

regards,
Vikram



  

GenerateSHA512.tar.gz
Description: GNU Zip compressed data
--
Increase Visibility of Your 3D Game App  Earn a Chance To Win $500!
Tap into the largest installed PC base  get more eyes on your game by
optimizing for Intel(R) Graphics Technology. Get started today with the
Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs.
http://p.sf.net/sfu/intelisp-dev2dev___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user