Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1091] id property of <Picker> other than 'picker' is treated as a variable

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-07-21T19:03:22.000+0000
Affected Version/sAlloy 1.4.0
Fix Version/sAlloy 1.5.0, Alloy 1.4.1
ComponentsXML
Labelsqe-testadded
ReporterKosuke Isobe
AssigneeTim Poulsen
Created2014-07-18T07:15:38.000+0000
Updated2014-07-25T03:27:21.000+0000

Description

If you use id name except 'picker' to Picker, that id will be handled as variable.

view

<Alloy>
  <Picker id="testpicker"/>
</Alloy>

style

'#testpicker': {
  type: Ti.UI.PICKER_TYPE_DATE_AND_TIME
}

compiled code

$.__views.testpicker = Ti.UI.createPicker({
  type: Ti.UI.PICKER_TYPE_DATE_AND_TIME,
  id: testpicker
});

Comments

  1. Far 2014-07-18

    Already reported as [TC-4370]
  2. Tim Poulsen 2014-07-18

    Confirmed to be a problem with only datetime type pickers.
  3. Tim Poulsen 2014-07-21

    PR https://github.com/appcelerator/alloy/pull/486 Test app: use the test/app/testing/ALOY–263 app, but modify the id associated with the picker in that app to be something other than 'picker (make sure to change in both the XML and TSS). It should build and run without error. Finally, as described in ALOY-1093, this also resolves the issue of string values of picker properties getting parsed without the required quotes. Test by setting a property on the picker, such as right:'10dp' and building for Android.
  4. Tim Poulsen 2014-07-21

    PR merged to master and cherry-picked to 1.4 branch
  5. Federico Casali 2014-07-25

    Verified as fixed. Titanium SDK 3.3.0.GA Alloy 1.4.1-rc CLI 3.3.0 Appcelerator Studio 3.3.0.GA iOS iPhone 7.1.2 Android Nexus Galaxy 4.3. Closing.

JSON Source