wxSplashScreen and modal dialog problem ?

Chris Elliott biol75 at york.ac.uk
Sat May 17 05:12:16 PDT 2008


I am tempted to say its bad  design! Can you not check for the error  
before showing the splashscreen and only show it if there is no error?  
If you really want to do this, then don't use the autotimeout style  
(perphaps destroy the dialog using a timer in your frame?)

chris



On 17 May 2008, at 11:57, Lothar Behrens wrote:
>
>
> Hi,
>
> I have noticed for a while, that I get a blocking behaviour, when I
> use a splash screen and while this is shown,
> any modal error messages are blocking, because the dialog didn't get
> displayed with all the contents.
>
> So I cannot see the error and also not press ok for that dialog.
>
> Is there any way to ask the framework if there is currently a splash
> screen ?
> If so I could wait until the splash screen disapears.
>
> I don't know, how long it takes until an error message would appear,
> so I could not
> assume that the splash screen is destroyable by calling splash-
>> Close(); because
> the object pointer may no longer be valid.
>
> I am currently testing this code on Mac OS X 10.3.9 with wxMac 2.6.2.
> I have not ported my app to current
> wxWidgets libraries and this may be a general problem.
>
> This is currently my code that implements the splash like this:
>
> 	splash = new wxSplashScreen(bitmap,
> 		wxSPLASH_CENTRE_ON_SCREEN|wxSPLASH_TIMEOUT,
> 		6000, NULL, -1, wxDefaultPosition, wxDefaultSize,
> 		wxSIMPLE_BORDER|wxSTAY_ON_TOP);
> 	}
>
> 	wxYield();
>
> 	wxMessageDialog dialog(NULL, "Some error occured ...", "Error",
> wxOK);
> 	dialog.ShowModal();
>
> 	// Initialize the frame
>
> 	// ...
> 	myFrame->Show(TRUE);
>
> Thanks,
>
> Lothar
> _______________________________________________
> wx-users mailing list
> wx-users at lists.wxwidgets.org
> http://lists.wxwidgets.org/mailman/listinfo/wx-users



More information about the wx-users mailing list