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

Benoit Minisini gambas at ...1...
Sat Aug 16 18:08:56 CEST 2008


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




More information about the Devel mailing list