Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1503] After Alloy compile, property which has array disappear.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2016-06-10T00:59:54.000+0000
Affected Version/sn/a
Fix Version/sRelease 5.4.0, alloy 1.9.0, alloy 1.9.1
ComponentsTitanium SDK
Labelsn/a
ReporterJong Eun Lee
AssigneeFeon Sua Xin Miao
Created2016-06-09T02:52:24.000+0000
Updated2016-08-01T19:10:42.000+0000

Description

When alloy compile below tss,

"#webView[platform=android]":{
	blacklistedURLs : ['intent://','ispmobile://','market://'],
}

"#webView[platform=ios]":{
	blacklistedURLs : ['intent://'],
}

Result

After alloy compiling, /Resources/android/app/controller/index.js (Android result)
  $.__views.webView = Ti.UI.createWebView({
        id: "webView"
    });

Expected Result

it should be
  $.__views.webView = Ti.UI.createWebView({
        id: "webView",
        blacklistedURLs : ['intent://','ispmobile://','market://'],
    });

But! In this case, it works

But, after change style order like below: it works properly. Before : android rule is first After : iOS rule is first
"#webView[platform=ios]":{
	blacklistedURLs : ['intent://'],
}

"#webView[platform=android]":{
	blacklistedURLs : ['intent://','ispmobile://','market://'],
}

Additional Notice

This bug appear only when property has array value.

Comments

  1. Chee Kiat Ng 2016-06-09

    weird bug.
  2. Jong Eun Lee 2016-06-09

    Yes! SUPER WEIRD! :(
  3. Feon Sua Xin Miao 2016-06-09

    PR: https://github.com/appcelerator/alloy/pull/791
  4. Chee Kiat Ng 2016-06-10

    PR Merged.
  5. Eric Wieber 2016-08-01

    Verified fixed, using: MacOS 10.11.5 (15F31a) Ti SDK 5.4.0.v20160801022303 Appc NPM 4.2.7 Appc CLI 5.4.0-37 Alloy 1.9.1 Xcode 7.3.1 (7D1014) Properties with arrays appear correctly after compiling, regardless of which platform is defined first. Tested with multiple properties, with different array values, defined in various orders in the TSS and in-line in the XML. In each case, the property contained the correct array values after compilation.

JSON Source