[TIMOB-6684] Android: Move Object.prototype.extend to the "kroll" namespace
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-09-13T00:09:22.000+0000 |
Affected Version/s | Release 1.8.0.1 |
Fix Version/s | Release 1.8.0.1, Release 2.0.0 |
Components | n/a |
Labels | module_api, qe-review, qe-testadded, tbs-1.8.1, verified-1.8.0.1 |
Reporter | Marshall Culpepper |
Assignee | Opie Cyrus |
Created | 2011-12-15T02:02:13.000+0000 |
Updated | 2012-09-13T00:09:22.000+0000 |
Description
We currently define Object.prototype.extend for mixin style functionality in platform. Some 3rd party frameworks and modules use the API name "extend" in other places which would potentially conflict with our use. We can easily avoid this conflict by using our internal "kroll" namespace for this API.
To test, just put the following in a test app.js and once run value of extend in the log should be "undefined":
var win = Ti.UI.createWindow({backgroundColor: "red"});
win.open();
var x = {};
Ti.API.info("-------> value of extend for \"x\" is: " + x.extend);
if (x.extend === undefined) {
Ti.API.info("\"x\" is undefined");
} else {
Ti.API.info("\"x\" is not undefined");
}
Thanks a lot for fixing this so fast! I've seen its already in the continuous builds as of Dec 15. Best regards. Dietrich.
Verified fix on: SDK build: 1.8.0.1.v20111220190134 Runtime: V8, Rhino Titanium Studio, build: 1.0.7.201112152014 Device: Droid 1 (2.2.2) OS: Mac OS X Lion Note: Will not close bug until verify fix in 1.9.0
Verified fixed with : Mobile sdk-2.2.0.v20120810080115 Titanium Studio, build: 2.1.1.201207271312 Device: Galaxy S III Android version 4.0.4
Reopening to update labels