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

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: Sat Oct 31 03:28:32 GMT+1 2026

Total time taken to generate the page: 0.00955 seconds