[Gambas-user] Form does not update during a debug session

Tobias Boege taboege at ...626...
Mon Jun 9 22:11:56 CEST 2014


On Mon, 09 Jun 2014, Orionis wrote:
> I'm experimenting this issue:
> A form called 'modList' contains a TableView and some other simple controls
> like labels.
> NOTE: this is a modal window.
> 
> A pubblic sub 'Update'  is called inside the module with:
> 
> Public Sub DoUpdate_Click()
>    Update
> End
> 
> The Update procedure must be debugged for some inconsistencies with a
> breakpoint at the beginning of procedure.
> Stepping with F8 does not show any change in the controls contents although
> the code applies them.
> This happens even placing some 'refresh' in the code,
> Only when the 'end' in the DoUpdate call is reached the windows is actually
> updated.
> 
> Is this behaviour correct or am I missing something ?
> 

It's normal. The docs[0] say:

--8<---
Sub Refresh ( )

Redraws the control, or just a part of it.

The redraw is defered and is processed at the next call of the event loop.

If you need an immediate refresh, call WAIT after having used this method.
--8<---

In a nutshell:

--8<---
Graphical controls are refreshed during the event loop, not when you change
their properties.
--8<---

as said in [1].

Regards,
Tobi

[0] http://gambaswiki.org/wiki/comp/gb.qt4/control/refresh
[1] http://gambaswiki.org/wiki/cat/eventloop

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list