[Gambas-devel] Error in gb.form.mdi

David Villalobos Cambronero david_villalobos_c at ...7...
Sat Aug 16 18:43:15 CEST 2008


Well, when this event is raised, I execute a procedure, it makes a lot of querys in the database, and the procedure is executed     
twice, and I want to avoid that, but if it is correct I will place a Flag, or something like that to avoid the second run.

Regards


David



----- Original Message ----
From: Benoit Minisini <gambas at ...1...>
To: mailing list for gambas developers <gambas-devel at lists.sourceforge.net>
Sent: Saturday, August 16, 2008 10:08:56 AM
Subject: Re: [Gambas-devel] Error in gb.form.mdi

On samedi 16 août 2008, David Villalobos Cambronero wrote:
> Hi Benoit,
>
>     I think there is a bug in the Activate event in WorkSpace in Gambas 3
> (I didn't look in Gambas 2). The documentation says that this event is
> raised when the active window changes, but it is raised to when you click
> on the same window.
>
> To see an example just add the following lines to the end of the class for
> FMain in gb.form.mdi:
>
> Public Sub Workspace1_Activate()
>
>   Print "Hello"
>
> End
>
> And see when and how many messages are printed.
>
> If you comment the Fworkspace::tabWorkspace_Click() the problem is solve.
>
> Could you please validate?
>
> Best regards
>
> David
>

The documentation is not accurate. 'Activate' is raised when a child window is 
activated. But it is raised too when the window is already the current 
window. 

The aim of this event was the same as the top-level window 'Activate' event. 
So it should not be raised when the child window is already "activated", i.e. 
when one f its children already has the focus. I should detect that specific 
case, but I didn't the time to do it.

What's the problem with having more "Activate" events than needed?

-- 
Benoit Minisini

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Gambas-devel mailing list
Gambas-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-devel








More information about the Devel mailing list