Titanium

[ALOY-1090] Views XML: Support spaces in comma-separated lists of targets in the platform attribute

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-07-29T14:59:43.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.5.0
ComponentsXML
Labels3.3.0.GA, alloy, qe-manualtest
ReporterManuel Conde Vendrell
AssigneeFeon Sua Xin Miao
Created2014-07-18T11:05:48.000+0000
Updated2014-08-13T17:15:07.000+0000

Description

After one hour struggling my mind (since the update from 3.2.3 to 3.3.0) why the same code didn't work, I found a little bug, I suppose its in Alloy 1.4, because changing the SDK from 3.3.0 to 3.2.3 didn't work
<Alloy>
  <Window platform="android, mobileweb" exitOnClose="true">
    <Button bottom="5" width="Ti.UI.FILL">Click</Button>
  </Window>
</Alloy>
For JS only $.index.open(); When compiling to Mobile Web it throws an error "undefined open". The problem was the *space* between *android* and *mobileweb*. After delete it, all works. Previously to the update, the original code worked fine.
<Alloy>
  <Window platform="android,mobileweb" exitOnClose="true">
    <Button bottom="5" width="Ti.UI.FILL">Click</Button>
  </Window>
</Alloy>
Someone have the same issue?.

Comments

  1. Tim Poulsen 2014-07-18 [~ mcvendrell] In ALOY-1028 (and its linked ticket) we resolved an issue in which comma-separated platform lists were not actually being respected. In other words, in Alloy 1.3.1, the code was not properly parsed when you targeted multiple platforms and you could end up with non-platform-appropriate components in your app. So, we fixed that. However, as you note, the space in the string is now throwing our parser logic off track. I'm pretty sure our docs show no spaces. But really, we should be able to allow the spaces.
  2. Tim Poulsen 2014-07-18 While the environment notes Windows, this is likely an issue on all operating systems and should be tested across all.
  3. Feon Sua Xin Miao 2014-07-25 PR: https://github.com/appcelerator/alloy/pull/493 Test app: https://github.com/feons/alloy/tree/ALOY-1090/test/apps/testing/ALOY-1090 Functional Test: The sample app should compile and run with no error on ios, android and mobileweb. Note the spaces between the values of the platform attribute.
  4. Tim Poulsen 2014-07-29 PR merged
  5. Federico Casali 2014-08-13 Verified working as expected on iPhone 5 iOS 7.1.2, Nexus Galaxy 4.3, MobileWeb. TiSDK 3.4.0.v20140808101714 Appcelerator Studio 3.3.1.201408121314 Alloy 1.5.0-dev Closing

JSON Source