[Gambas-user] How do I delete a control on scrollview the correct way?
Ron Onstenk
ronstk at ...239...
Thu Jun 8 08:52:37 CEST 2006
On Tuesday 06 June 2006 14:28, Daniel Campos wrote:
> I'm not sure, but may be the control is not really deleted until the even
> loop happens, so you should add a WAIT instruction after the deletion. May
> be it helps...
>
> By the way, as "Delete" is a method, may be the "Delete()" syntax is more
> ellegant, even if Gambas allows to use the first one.
>
> Daniel
>
Yes, the use of WAIT was the solution.
Had similar problem with popup menu event.
I use now a simple rule
If the code during an event has a graphical change
as end result then do not trust that it is already
available/done after the code part that has done the change.
If problems arise use a WAIT after the statement that does
the change (try to keep the time as less as possible).
I'm happy to announce this rule is most of the time false :)
Adding control object works instant (as the experience is now)
but deleting needs the WAIT and popup menu also.
About '.Delete' or '.Delete()' , thats the question.
I see example code with and without '()'
Sometimes it looks to me they are optional, other
times they are required or forbidden.
The doc shows them almost always for methods, event if
forbidden.
Sorry, no direct example available out of my mind.
Happy gambasian
Ron
More information about the User
mailing list