You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// This is the case when a scale variable is transformed into a nominal or ordinal, and the variable has more than the default maximum number of levels
367
+
// This should not be checked if maxLevels is explicitly set (that is if _maxLevels >= 0)
368
+
addControlErrorPermanent(tr("Attempt to transform scale variable %1 into a %2 variable, but its number of levels %3 exceeds the maximum %4. If you still want to use this variable, either change its type, or change 'Maximum allowed levels for scale' in Preferences / Data menu")
addControlErrorPermanent(tr("Minimum number of numeric values is %1. Variable %2 has only %3 different numeric values").arg(_minNumericLevels).arg(variable).arg(nbNumValues));
int maxScaleLevels = PreferencesModelBase::preferences()->maxScaleLevels();
379
+
addControlErrorPermanent(tr("Maximum number of numeric values is %1. Variable %2 has %3 different numeric values").arg(_maxNumericLevels).arg(variable).arg(nbNumValues));
380
+
returnfalse;
381
+
}
382
+
383
+
returntrue;
384
+
}
385
+
386
+
boolJASPListControl::_checkLevelsConstraints()
387
+
{
388
+
bool checked = true;
345
389
346
-
for (const Term& term : model()->terms())
390
+
for (const Term& term : model()->terms())
391
+
{
392
+
if (!_checkLevelsConstraintsForVariable(term.asQString()))
// This is the case when a scale variable is transformed into a nominal or ordinal, and the variable has more than the default maximum number of levels
372
-
// This should not be checked if maxLevels is explicitly set (that is if _maxLevels >= 0)
373
-
addControlErrorPermanent(tr("Attempt to transform scale variable %1 into a %2 variable, but its number of levels %3 exceeds the maximum %4. If you still want to use this variable, either change its type, or change 'Maximum allowed levels for scale' in Preferences / Data menu")
addControlErrorPermanent(tr("Minimum number of numeric values is %1. Variable %2 has only %3 different numeric values").arg(_minNumericLevels).arg(termStr).arg(nbNumValues));
addControlErrorPermanent(tr("Maximum number of numeric values is %1. Variable %2 has %3 different numeric values").arg(_maxNumericLevels).arg(termStr).arg(nbNumValues));
0 commit comments