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 |
|
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 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
|
|
|
Goto Forum:
Current Time: Wed May 08 01:45:07 CEST 2024
Total time taken to generate the page: 0.03006 seconds
|