[ALOY-449] Parsing state not clean when processing multiple top-level UI elements
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Critical |
| Status | Resolved |
| Resolution | Fixed |
| Resolution Date | 2013-01-07T20:17:35.000+0000 |
| Affected Version/s | Alloy 0.3.4 |
| Fix Version/s | Alloy 0.3.5, 2013 Sprint 02 |
| Components | XML |
| Labels | customer |
| Reporter | Tony Lukasavage |
| Assignee | Unknown |
| Created | 2013-01-03T16:32:49.000+0000 |
| Updated | 2018-03-07T22:26:15.000+0000 |
Description
Alloy is not properly using a fresh state when it is processing multiple top-level UI elements in view markup. For example, in the following case, an invalid state is passed to the final **actionBar** element, causing errors on Android.
<Alloy>
<View id="dashboardContainer" platform="android"/>
<TableView id="dashboard" platform="ios">
<TableViewSection/>
</TableView>
<View id="actionBar"/>
</Alloy>
The **actionBar** element will get assigned the wrong id, **dashboard**, during the parsing. In order to prevent this, Alloy needs to be sure to create a new, fresh state when processing each top-level UI element, not reuse the existing state from the prior top-level element.
Fix confirmed