Titanium JIRA Archive
Alloy (ALOY)

[ALOY-826] Required ListSections always come first

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-01-22T19:06:08.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.4.0
ComponentsTitanium SDK
Labelsalloy, listsection, listview, qe-testadded, require, widgets
ReporterFokke Zandbergen
AssigneeTony Lukasavage
Created2013-08-05T18:47:51.000+0000
Updated2014-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.

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

FileDateSize
foto.PNG2013-09-10T19:26:27.000+000023181

Comments

  1. Mauro Parra-Miranda 2013-09-09

    Please provide a testcase with filenames & screenshots.
  2. Fokke Zandbergen 2013-09-10

    Updated with exact steps, code and screenshot.
  3. Tim Poulsen 2014-01-21

    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.
  4. Tony Lukasavage 2014-01-22

    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.
  5. Lokesh Choudhary 2014-05-10

    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

JSON Source