[Gambas-user] Bug with GTK+

Benoît Minisini gambas at ...1...
Tue Dec 16 03:44:38 CET 2014


Le 16/12/2014 03:29, Jussi Lahtinen a écrit :
>> But there is no need to disable the control, re-enabling it, then giving
>> it focus back. What for? Just disable it when enter is hit.
>>
>
> The code you see is only isolation for demonstration of the problem. There
> is really code (call of sub) between disabling and enabling the control.
> It's not enough to just disable the control when I hit enter, because the
> program ask more input when it is done showing some data. Thus re-enabling.
> I think I added the focus because in some cases, the focus went to the
> control displaying the data (or somewhere else?).
>
>
> Jussi

I'm not clear enough: you should not have to disable and re-enabling a 
control inside an event handler, because you are not supposed to call 
event loop (WAIT <time> instruction) inside an event handler. If you 
don't call the event loop, then disabling then re-enabling is useless.

Regards,

-- 
Benoît Minisini




More information about the User mailing list