[ALOY-826] Required ListSections always come first
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-01-22T19:06:08.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.4.0 |
Components | Titanium SDK |
Labels | alloy, listsection, listview, qe-testadded, require, widgets |
Reporter | Fokke Zandbergen |
Assignee | Tony Lukasavage |
Created | 2013-08-05T18:47:51.000+0000 |
Updated | 2014-05-10T00:29:06.000+0000 |
Description
In Alloy, required sections in a ListView always come before any inline ones, not adhering to the actual order.
Create a new app:
Make it an alloy app:
For the
Create a second view called
Compile and build the app to a device:
Open the compiled
Steps to reproduce
Create a new app: titanium create -p ios -n testSessions -d . --id test.Sessions
Make it an alloy app: cd testSessions && alloy new
For the index.xml
use:
<Alloy>
<Window>
<ListView>
<ListSection>
<ListItem title="One" />
<ListItem title="Two" />
<ListItem title="Three" />
</ListSection>
<Require src="section" />
</ListView>
</Window>
</Alloy>
Create a second view called section.xml
with:
<Alloy>
<ListSection>
<ListItem title="Required" />
</ListSection>
</Alloy>
Compile and build the app to a device: titanium build -p ios -T device
Run the app and see *Required* comes before *One, Two, Three*, as shown in attached screenshot.
Open the compiled Resources/alloy/controllers/index.js
to see that indeed the code for the required section comes before the inline ones.
Attachments
File | Date | Size |
---|---|---|
foto.PNG | 2013-09-10T19:26:27.000+0000 | 23181 |
Please provide a testcase with filenames & screenshots.
Updated with exact steps, code and screenshot.
I can confirm the behavior reported on this ticket. Testcase: I followed the steps described by Fokke: 1. New Alloy app (I used Studio, not the CLI as described) 2. Two controllers: index & section, with XML as provided in the ticket 3. Build for iOS Simulator. My output matches the attached screen.
PR: https://github.com/appcelerator/alloy/pull/308 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-826 Functional test (and test app) are the same as in this ticket's description.
Verified the fix. The listview section comes after one ,two, three as expected & according to index.xml file. Closing. Environment: Appc Studio : 3.2.3.201404181520 Ti SDK : 3.3.0.v20140508223312 Mac OSX : 10.8.5 Alloy : 1.4.0-dev CLI - 3.3.0-dev Ipad simulator & Iphone simulator