[Gambas-user] Showing the Form's Gui

Doriano Blengino doriano.blengino at ...1909...
Tue Apr 13 16:17:01 CEST 2010


Fabien Bodard ha scritto:
> 2010/4/13 Doriano Blengino <doriano.blengino at ...1909...>:
>   
>> Fabien Bodard ha scritto:
>>     
>>> just remember to put a flag to say when the data are loaded !
>>>
>>>       
>> What would be the reason for this flag?
>>     
> if the form is showed and the data not accessible ?
>   
Really, there could be a problem if the user clicks a button 50 ms after 
the button (and the whole form) is visible. A remote possibility, and 
application-dependent. But I know users enough to imagine that someone 
could do it... :-)

Reducing the interval of the one-shot timer can help, but does not solve 
(interval=0 could?). The better way is to disable actions the user could 
do with invalid data (application dependent: who says that the form is 
intended to receive clicks?), and perhaps add a nice label stating 
"Loading data, please wait..." and so on.

Anyway, the flag is the worse solution. Supposing you use a flag, and 
the user clicks or types too fast, what would you do? A 
Message.Info("You clicked too fast. Go to have a coffee and come back 
later.")? :-) Better to disable some controls, so the user is informed 
before; in addition, controls are already "global variables" which carry 
informations with them. Well, this is my opinion - I hate to duplicate 
informations around, but someone else on this list, time ago, said 
"never use the GUI to store information". The problem with global (or 
class) variables is that you can forget them more easily than some 
property of a visible control.

Regards,
Doriano





More information about the User mailing list