Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6684] Android: Move Object.prototype.extend to the "kroll" namespace

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2012-09-13T00:09:22.000+0000
Affected Version/sRelease 1.8.0.1
Fix Version/sRelease 1.8.0.1, Release 2.0.0
Componentsn/a
Labelsmodule_api, qe-review, qe-testadded, tbs-1.8.1, verified-1.8.0.1
ReporterMarshall Culpepper
AssigneeOpie Cyrus
Created2011-12-15T02:02:13.000+0000
Updated2012-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");
}

Comments

  1. Dietrich Streifert 2011-12-15

  2. Dietrich Streifert 2011-12-15

    Thanks a lot for fixing this so fast! I've seen its already in the continuous builds as of Dec 15. Best regards. Dietrich.
  3. Wilson Luu 2011-12-21

    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
  4. Rima Umbrasas 2012-08-15

    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
  5. Anshu Mittal 2012-09-13

    Reopening to update labels

JSON Source