The _setDecimals method is valid only if the viewer is a table editor. You can use the _setDecimals method only to pass a row/column data vector to the model's _getColumnInfo or _setColumnInfo method.
The first example subclasses the Data Set Data Model class and overrides its _getColumnInfo method. The second example subclasses the Data Set Data Model class and overrides its _getColumnInfo and ...