Feature #527

Add operator = to EditIntSpin and rest of WithSpin controls

Added by Iñaki Zabala over 7 years ago. Updated over 7 years ago.

Status:ApprovedStart date:09/27/2013
Priority:NormalDue date:
Assignee:Miroslav Fidler% Done:

0%

Category:CtrlLibSpent time:-
Target version:-

Description

Now it is an error to do:

EditIntSpin data;
data = 23;

However in EditInt is permitted.

It as simple as adding this to WithSpin:

WithSpin& operator=(const DataType& t) { Base::SetData(t); return *this; }

History

#1 Updated by Miroslav Fidler over 7 years ago

  • Assignee changed from Miroslav Fidler to Iñaki Zabala

Seriously, if anything, I would like to remove operator= form EditInt.

For years, these things are supposed to be done with common <<= (and reverse with ~) operator. These early operator= variants are only kept to allow really old code to compile.

#2 Updated by Iñaki Zabala over 7 years ago

  • Assignee changed from Iñaki Zabala to Miroslav Fidler

Yes you are right.

In that case it would be good to remove operator= in EditXXX classes as I think <<= and a ~ operators are active as they are defined in Ctrl. Is not it?.

Some old code will complain but the fix is very easy. You could post it.

#3 Updated by Miroslav Fidler over 7 years ago

  • Status changed from New to Approved

Commented as deprecated, docs removed...

Also available in: Atom PDF