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 » LineEdit, EditFields, DocEdit » recent MinMax Refresh fix not GCC compilable
Re: recent MinMax Refresh fix not GCC compilable [message #29456 is a reply to message #29455] Thu, 21 October 2010 21:52 Go to previous messageGo to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
you probably placed the typedef outside the class, it has to be like

template <class DataType, class Cv>
class EditMinMax : public EditValue<DataType, Cv> {
public:
	typedef EditValue<DataType, Cv> R;
	EditMinMax& operator=(const DataType& t)          { SetData(t); return *this; }

	EditMinMax() {}
	EditMinMax(DataType min, DataType max)            { Cv::MinMax(min, max); }

	EditMinMax& Min(DataType min)                     { Cv::Min(min); R::Refresh(); return *this; }
	EditMinMax& Max(DataType max)                     { Cv::Max(max); R::Refresh(); return *this; }
	EditMinMax& NotNull(bool nn = true)               { Cv::NotNull(nn); R::Refresh(); return *this; }
};

template <class DataType, class Cv>
class EditMinMaxNotNull : public EditValue<DataType, Cv> {
public:
	typedef EditValue<DataType, Cv> R;
	EditMinMaxNotNull& operator=(const DataType& t)   { SetData(t); return *this; }

	EditMinMaxNotNull()                               { Cv::NotNull(); }
	EditMinMaxNotNull(DataType min, DataType max)     { Cv::NotNull(); Cv::MinMax(min, max); }

	EditMinMaxNotNull& Min(DataType min)              { Cv::Min(min); R::Refresh(); return *this; }
	EditMinMaxNotNull& Max(DataType max)              { Cv::Max(max); R::Refresh(); return *this; }
	EditMinMaxNotNull& NotNull(bool nn = true)        { Cv::NotNull(nn); R::Refresh(); return *this; }
};

tried it with both TDMGCC and MINGW, must work
 
Read Message
Read Message icon4.gif
Read Message
Read Message
Read Message
Previous Topic: [SECURITY] Drag-n-drop enabled in password fields
Next Topic: operator<<= in tree control reference example
Goto Forum:
  


Current Time: Sun Jun 08 01:11:59 CEST 2025

Total time taken to generate the page: 0.05839 seconds