[Gambas-user] (no subject)

Rolf-Werner Eilert eilert-sprachen at ...221...
Thu Mar 3 10:59:21 CET 2011


Am 03.03.2011 10:33, schrieb vikram:
> Hi,
>
> An application I am working on allows users to select .sql dump files and the "source" them into MySQL. I am storing the paths of .sql files obtained via Dialog.OpenFile() in a array and then iterating through the array with the following command(via SHELL) to "source" the .sql database dumps.
>
> mysql -uroot -padmin -e \"source "&  Globals.DBsqlFilePathArray[counter]&  "\""
>
> Trouble is the application becomes unresponsive when large files are used. So I display a Message dialog informing the user that the operation will take some time and then follow a previous thread (http://www.mail-archive.com/gambas-user@lists.sourceforge.net/msg11153.html) to display the busy cursor. But the busy cursor is not displayed when the user moves the mouse over the Message dialog. It still feels like the application has "frozen".
>
> I feel displaying a progressbar would be better, but I am not able to figure out how I can get the progress bar to work with the "source" operation in the background. I did check out the progressbar sample here(http://gambaslinux.eg2.fr/articles.php?lng=en&pg=126), but thats not exactly what i am trying to make. Even a dummy progress bar whose value keeps cycling between 0 and 1 would do.
>
> Are there any tutorials or examples related to using progress bars in gambas?
>
> Thanks in advance,
> Best Regards,
> Vikram Nair
>

Is there a way you can prepare the display before you call mysql? I had 
the same trouble with a printer function (not external one, but seems to 
be the same problem). My solution was to call the display things that 
say "please wait" and then refresh and WAIT so the display has a chance 
to build up before I dive into the printing part.

However, during printing I did not find a functioning way of reading the 
mouse enabling the user to actually click on "Abort" to stop the 
process. I tried everything, but the function will only react when work 
is done, so aside from its displaying use, the Abort thing has remained 
useless. What I did achieve is that it displays the pages or names 
printed during printing - the display refreshing part is running.

Regards

Rolf




More information about the User mailing list