[ALOY-1091] id property of <Picker> other than 'picker' is treated as a variable
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-07-21T19:03:22.000+0000 |
Affected Version/s | Alloy 1.4.0 |
Fix Version/s | Alloy 1.5.0, Alloy 1.4.1 |
Components | XML |
Labels | qe-testadded |
Reporter | Kosuke Isobe |
Assignee | Tim Poulsen |
Created | 2014-07-18T07:15:38.000+0000 |
Updated | 2014-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
});
Already reported as [TC-4370]
Confirmed to be a problem with only datetime type pickers.
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.
PR merged to master and cherry-picked to 1.4 branch
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.