[Gambas-user] 2 forms closing at the same time. Is it a bug?

Toni arosa at ...2015...
Sun Nov 15 15:45:56 CET 2009


Hi Benoît and others,
Thanks for the info.

> The first shown window is the "main window", and closing it automatically 
> close all other opened windows.
> Maybe I should have made this feature optional.

It seems to me that when an application is set to start  using a Module 
instead of a form, it doesn't make sense to treat any from as "main".
On the other hand, I'm not sure how this would mix with the "persistent" 
property in the forms.. but well, in anycase, for now I'll just reorder 
the creation of my forms. (even if it's doing something like 
"FMain.Visible = FALSE"  right at the beginning of my application)

Regards,
Toni

En/na Benoît Minisini ha escrit:
>> Hi,
>> I'm not sure whether this is a bug or it's me doing something wrong...
>>
>> When I want to show two (or more) Forms from a module set as "Startup
>> class" in its main function,  whenever a "ME.close" is called within one
>> of the forms, the other(s) one gets closed too.
>> To me this isn't the expected behavior... Just one of them should get
>> closed (the ME part is what made me expect it).
>>
>> I attach a simple project to illustrate my point, but basically it's as
>> follows:
>>
>> 1st.- Module1 ( as startup class)
>> PUBLIC FUNCTION Main()
>>
>>   Form1.Show
>>   FMain.Show
>>
>> END
>>
>> 2nd.- In Form1 "ME.Close" is executed
>>
>> 3th.- The FMain form gets closed too and the application finishes.
>>
>> Instead I would expect Fmain not being closed and the application left
>> running until Fmain gets closed by its own means.
>>
>> Regards,
>> Toni
>>
>>
>> P.S.: I'm testing it in an Ubuntu 8.10 64bits with Gambas version 2.17
>> (revision 2415)
>>
>>     
>
> The first shown window is the "main window", and closing it automatically 
> close all other opened windows.
>
> Maybe I should have made this feature optional.
>
> Regards,
>
>   




More information about the User mailing list