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 » operator<<= in tree control reference example
Re: operator<<= in tree control reference example [message #30521 is a reply to message #30518] Thu, 06 January 2011 12:12 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

gprentice wrote on Thu, 06 January 2011 11:53

The only operator<<= I can find is in the Ctrl base class
   const Value& operator<<=(const Value& v)   { SetData(v); return v; }


but the call to SetData (not SetValue?) is not virtual and just throws the data away - yet the code works ???


The fact you are missing is that SetData() is virtual Wink That way, if you override it in any Ctrl derived class you get automatically the <<= operator, since it is defined in Ctrl in such way that it calls the overridden method from the child class. There is no SetValue() (except some special Ctrls, like DropList, TreeCtrl etc.), the general interface for operating value of Ctrls is made entirely by SetData(), GetData() and their respective operators <<= and ~.

Honza
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: recent MinMax Refresh fix not GCC compilable
Next Topic: New Select form in DocEdit or LineEdit
Goto Forum:
  


Current Time: Wed May 08 01:45:07 CEST 2024

Total time taken to generate the page: 0.03006 seconds