Acknowledged
CIQQA-3922

bug: undocumented, breaking changes in SDK 9.1.0

Up-to SDK 8.4.1 Application.Properties.getValue and setValue had key as PropertyKeyType (and/or Object? Similar to:  documentation bug: Activity.Info fields have ambiguous type  ), but in SDK 9.1.0 it was changed to String. While this change makes sense, it causes apps not to compile (at least not with strict type check). This change is also not listed in the changelog.

Similarily the return type has chnanged from Application.PropertyValueType to Properties.ValueType, which not only changed name, module, but also meaning. Char and Null are no longer in ValueType.

Even worse: code like this no longer compiles with strict type check even after changing the types of key, value:

function setConfig(key as String, val as Properties.ValueType) as Void {
    if (Application has :Properties) {
        Properties.setValue(key, val);
    } else {
        getApp().setProperty(key, val);
    }
}

function getConfigImpl(key as String) as PropertyValueType or Null {
    var val;
    if (Application has :Properties) {
        val = Properties.getValue(key);
    } else {
        val = getApp().getProperty(key);
    }
    return val;
}

because setProperty, getProperty wasn't changed...

Parents
  • I am encountering the same issue.

    As a temporary workaround, I’ve added (:typecheck(false)) to the beginning of the function. However, since this disables type checking, I hope to see a permanent fix as soon as possible.

Comment
  • I am encountering the same issue.

    As a temporary workaround, I’ve added (:typecheck(false)) to the beginning of the function. However, since this disables type checking, I hope to see a permanent fix as soon as possible.

Children
No Data