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 » U++ Library support » TabCtrl » [BUG - FIXED] TabDlg crashes the application
Re: [BUG] TabDlg crashes the application [message #8578 is a reply to message #8576] Mon, 19 March 2007 23:50 Go to previous messageGo to previous message
victorb is currently offline  victorb
Messages: 78
Registered: December 2005
Location: Nice, France
Member
I finally found the issue in TabCtrl.cpp around l. 180

			ChPaint(w, r,
					(tab.GetCount() == 1 ? style->both : i == 0 ? style->first :
					 i == tab.GetCount() - 1 ? style->last : style->normal)
					[(!IsEnabled() || !t.enabled ? CTRL_DISABLED :
					 	phase?CTRL_PRESSED:
					 		i == hot?CTRL_HOT:CTRL_NORMAL)]
				);


I don't know why but the compiler seems to dislike this writting... it could be fixed by rewritting the code as

			int idx;
				ChPaint(w, r,
					(tab.GetCount() == 1 ? style->both : i == 0 ? style->first :
					 i == tab.GetCount() - 1 ? style->last : style->normal)
					[idx = (!IsEnabled() || !t.enabled ? CTRL_DISABLED :
					 	phase?CTRL_PRESSED:
					 		i == hot?CTRL_HOT:CTRL_NORMAL)]


Is it a compiler issue ? I am using 3.4.2 (delivered with Upp) could someone give it a try with an other version ?

Thanks,
Victor
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: TabCtrl and layouts
Next Topic: How to resize TabCtrl?
Goto Forum:
  


Current Time: Sun May 19 05:11:13 CEST 2024

Total time taken to generate the page: 0.01298 seconds