[ALOY-1516] Alloy: Text property inside LABEL element not displaying output of any method in combination with any text correctly
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-09-06T03:39:52.000+0000 |
Affected Version/s | Release 5.4.0, Release 5.3.1 |
Fix Version/s | alloy 1.9.2, Release 5.5.0 |
Components | Titanium SDK |
Labels | label, labels |
Reporter | Neeraj Mishra |
Assignee | Feon Sua Xin Miao |
Created | 2016-08-30T22:32:42.000+0000 |
Updated | 2016-09-15T14:17:37.000+0000 |
Description
Problem Description:
Text Property inside UI Element Label is not displaying output of a method used in combination with a text in an expected manner.Sample Code:
Alloy index.xml file content:
<Alloy>
<Window>
<View>
<Label textAlign="centerAlign" text="'Version:' + Ti.App.getVersion()"></Label>
</View>
</Window>
</Alloy>
Alloy index.js file inside controller:
$.index.open();
Output: 'Version:' + Ti.App.getVersion()
Expected Output: Version:1.0
Scenario 1:
Output is: 'Version:' + Ti.App.getVersion()Scenario2:
Output is : 1.0Version This output the value as expected but if we prefix some text before the method, it consider the whole as a text and displays it inside label rather executing the method. I have tried with some other methods like Ti.getVersion() and it is the same behavior. Please let us know if any other info is required.Comments
- Neeraj Mishra 2016-08-30 INC0397519
- Feon Sua Xin Miao 2016-09-01 PR: https://github.com/appcelerator/alloy/pull/796
- Kondal Kolipaka 2016-09-06 Merged into master branch.
- Ewan Harris 2016-09-15
Verified using:
Windows 10 Pro, OSX 10.11.6
Appc Core: 5.5.0
Appc NPM: 4.2.7
Ti SDK: 5.5.0.GA
Galaxy Note 3 (Android 5.0)
Lumia 930 (Windows 10 Mobile)
iPhone 7 Plus simulator (iOS 10.0)
The label now displays the expected output of
Version:1.0
Closing ticket