Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Jun 22 12:12:34 CEST 2025

Total time taken to generate the page: 0.07418 seconds