gprentice Messages: 260 Registered: November 2005 Location: New Zealand
Experienced Member
cbpporter wrote on Wed, 05 January 2011 23:07
Well <<= is pretty standard for U++, and comes often in pair with ~, which does the opposite. For controls it is SetValue/GetValue. It is just one of the conventions you need to learn and what contributes to the learning curve of U++. It is the same with standard C++ and << for streams and other conventions.
The reason "=" is not used because it would be confusing. You use "=" between different types, but only if they are near identical/easily convertible. Like different representation of the same data. But an EditField is not a Value. It has a Value. This is why we use <<=, or the "kind of assign operator, but more of s take this value and use it" operator.
Actually I can't even see how that operator<<= works.
edit is declared like this
Array<EditString> edit;
and the code does
edit.Top() <<= n;
where n is a String. So the LHS is EditString&. The only operator<<= I can find is in the Ctrl base class