Could you test this version for me?
https://github.com/mendix/CustomString/raw/bugfix/mssing_object/dist/CustomString.mpk
Should have a null check in there. My guess is that the update method is somehow triggered when you delete the object, which in turn creates this issue. The version here should fix that issue. If so, I'll create an update for the App Store.
This is most likely an issue in the widget itself, probably a missing null check for _contextObject around line 73
_updateRendering : function (callback)\
{
logger.debug(this.id + "._updateRendering");
mx.ui.action(this.sourceMF, {
params: {
applyto : "selection",
guids : [this._contextObj.getGuid()] //MISSING NULL CHECK
},
callback : lang.hitch(this, this._processSourceMFCallback, callback),
error : lang.hitch(this, function(error) {
alert(error.description);
this._executeCallback(callback, "_updateRendering error");
}),
onValidation : lang.hitch(this, function(validations) {
alert("There were " + validations.length + " validation errors");
this._executeCallback(callback, "_updateRendering onValidation");
})
}, this);
},
AFAIK there is no way to prevent this error without changing the widget source code. Since this is not a Mendix platform widget try submitting an issue about it in Github – https://github.com/mendix/CustomString/issues
-Andrej