[Gambas-user] BUG, Model Frame creates Modeless Frame which can't be closed

Benoit Minisini gambas at ...1...
Thu Jul 14 19:31:25 CEST 2005


On Monday 04 July 2005 16:40, Toni Schornboeck wrote:
> Hi Guys!
>
> I use this piece of code to ensure there is always a meaningfull error
> message, even if the app crashes:
>
> STATIC PUBLIC SUB Main()
>  DIM e AS ExceptionForm
>  DIM f AS Startup
>
>  f=NEW Startup
>  TRY f.ShowModal()
>  IF ERROR THEN
>    e=NEW ExceptionForm
>    e.ShowModal()
>    QUIT
>  END IF
> END
>
>
> Startup is my real main form, I show it modal, because I want Main() to
> wait for it to close before proceeding.
>
> But within my application I want to use modeless windows. I can open them
> without problem, but you cannot close them. Even calling ME.Close() doesn't
> help. Only solution is to do ME.Delete(). But unfortunately there is no way
> to close this window using the windowclose 'button' in the window-title
> (where lower, raise, shade, etc. is). Even the parent window is unclosable.
>
> So my questions are:
> am I intented to open modeless windows within a modal window?
> is there a way to do my exception handling with a modeless window?
>
> If I'm not supposed to open modeless windows form a modal one, it should
> give an error message. If I'm allowed to do so, then it should be possible
> to close this window.
>
> Thank you in advance.
>
> PS: I'm using gambas 1.0.6 (just downloaded 1.0.7 today and will compile it
> later this week).
>
> I'm using Yoper 2.1 (KDE 3.3.0 and Qt 3.3)
>

OK. I will fix that.

The bug is that the interpreter must not let you show a form modeless when a 
modal form is already opened. As soon a modal form is opened, all other 
successively opened windows must become modal.

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list