U++ framework
Do not panic. Ask here before giving up.

Home » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » Problem re-compiling an application that was working well
Re: Problem re-compiling an application that was working well [message #43309 is a reply to message #43300] Fri, 27 June 2014 12:16 Go to previous message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

This is weird... I have this code :
virtual void MyDialog::Paint(Draw& w) {
	if (couverture.IsEmpty()) {
		couverture = StreamRaster::LoadFileAny(ConfigFile("nocover.jpg"));
		cover.Set(couverture);
	}
	TopWindow::Paint(w);
}


It's freezing when the image is not there. Ok. So, I added a test before the call to cover.Set() :
virtual void MyDialog::Paint(Draw& w) {
	if (couverture.IsEmpty()) {
		couverture = StreamRaster::LoadFileAny(ConfigFile("nocover.jpg"));
		if (!couverture.IsEmpty()) cover.Set(couverture);
	}
	TopWindow::Paint(w);
}

and it works even if the image is missing.

But I don't understand why it is working with the old version even if the image is not there...
 
Read Message
Read Message
Previous Topic: TheIDE crash
Next Topic: Navigate Bar
Goto Forum:
  


Current Time: Sun May 10 06:46:20 GMT+2 2026

Total time taken to generate the page: 0.00479 seconds