Closed vallsv closed 4 years ago
Well, in fact i also receive a warning for other getters
MainThread WARNING 2020-02-24 11:27:46,301 TaurusRootLogger: /users/valls/workspace/id16/linecontrol.git/src/linecontrol/widget/taurus/TaurusButtonAttributeSetter.py:121: DeprecationWarning: TangoAttrValue.isBoolean is deprecated since 4.0. Use TangoAttribute.isBoolean instead
if obj.isBoolean():
But i only inherit from TaurusBaseWritableWidget
, and reach the attribute this way:
obj = self.getModelObj().getValueObj()
Any idea what's wrong here?
By code base was only needed the attribute type, then i remove the value. I also found the generic way to check string.
attr.type == taurusbasetypes.DataType.String
If it's fine, please close this issue.
Yes, as you already found out, the recommended scheme-agnostic way of checking the data type is comparing the value of TaurusAttribute.type
aginst the taurus.core.DataType
enumeration values.
In fact, I am surprised that TaurusAttribute.isBoolean()
and TaurusAttribute.isNumeric()
are not yet deprecated, since they are there only for historical reasons due to previous tango-centrisms
HI,
I would like to know why there is no string check, while,
isBoolean
,isInteger
... are there.Is there a clean way to check that the attribute stores a string?