Hello, I just want to let you know a problem I had, due to a mistake I made, in case it requires some safety check in the framework or simply if someone else got the same problem.
I had a definition of String.trim like that:
I've used it since SmartClient 7, without problems.
Now I was testing the enabled and visibility rules in my application and they won't work, with warnings like:
My bad, I didn't have a check to be sure to implement String.trim only if not already available. Now I've modified it in:
And everything works.
I don't know if it may require some safety check in the framework, anyway you may test it by adding the former implementation in the #enabledAndVisibilityRules showcase sample.
I had a definition of String.trim like that:
Code:
String.prototype.trim = function () { return this.replace(/^\s+|\s+$/g, ""); };
Now I was testing the enabled and visibility rules in my application and they won't work, with warnings like:
Code:
WARN:RulesEngine:isc_RulesEngine_0:RulesEngine unable to resolve locator specified on rule.
Code:
if (!String.prototype.trim) { String.prototype.trim = function () { return this.replace(/^\s+|\s+$/g, ""); }; }
I don't know if it may require some safety check in the framework, anyway you may test it by adding the former implementation in the #enabledAndVisibilityRules showcase sample.