[ALOY-1304] Alloy: Support Node text for TextField and TextArea
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | None |
| Status | Resolved |
| Resolution | Fixed |
| Resolution Date | 2018-08-10T08:58:38.000+0000 |
| Affected Version/s | Alloy 1.7.1 |
| Fix Version/s | CLI Release 7.0.4 |
| Components | XML |
| Labels | n/a |
| Reporter | Fokke Zandbergen |
| Assignee | Feon Sua Xin Miao |
| Created | 2015-09-16T09:58:18.000+0000 |
| Updated | 2018-08-14T16:04:51.000+0000 |
Description
The following sample and attached screenshot shows that
TextArea and TextField do not support using node text to set the value property.
<Alloy>
<Window backgroundColor="white" layout="vertical">
<Label top="20" width="100" backgroundColor="#ccc">Hello</Label>
<TextField top="20" width="100" backgroundColor="#ccc">Hello</TextField>
<TextArea top="20" width="100" backgroundColor="#ccc">Hello</TextArea>
</Window>
</Alloy>
This is in line with [documentation](http://docs.appcelerator.com/platform/latest/#!/guide/Alloy_XML_Markup-section-35621528_AlloyXMLMarkup-PropertyMapping) so not a bug, but a feature request.
Attachments
| File | Date | Size |
|---|---|---|
| iOS Simulator Screen Shot 16 Sep 2015 11.55.05.png | 2015-09-16T09:58:16.000+0000 | 17626 |
Why not:
Because you can also do
<Label>Hello</Label>and<Button>Hello</Button>and it makes sense to support the same forTextFieldandTextAreato make Alloy more predictable and the XML more readable.PR: https://github.com/appcelerator/alloy/pull/891