[ALOY-701] Alloy Listview templates don't support nesting
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Duplicate |
Resolution Date | 2013-06-12T14:08:52.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Carter Lathrop |
Assignee | Tony Lukasavage |
Created | 2013-06-01T18:15:50.000+0000 |
Updated | 2014-01-28T23:28:48.000+0000 |
Description
Paste into index.xml
Run a alloy compile. This is fail with relevant error strings.
<Alloy>
<Window class="container">
<ListView id="list" defaultItemTemplate="lvItem">
<Templates>
<ItemTemplate name="lvItem" id="lvItem">
<ImageView bindId="image" class="image" id="image" />
<View id="DetailContainer">
<Label bindId="name" id="name" />
<Label bindId="type" id="type" />
</View>
</ItemTemplate>
</Templates>
</ListView>
</Window>
</Alloy>
This sort of layout for a template won't compile. The nested labels in a view are in order to use a layout of vertical on DetailContainer. If there is a better way to deal with this then please tell me, but otherwise I think I have to guess heights for the labels.
Hello Neville, Would you mind providing a full test case, one that we can reproduce the issue so as to easily see what is going on? You can either package it up or just paste the necessary code. Once I can reproduce I would be glad to pass along to the Alloy team. For future reference: https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report Thanks for your cooperation, Carter
Hi Carter I have updated the description. Thanks
Hi Neville, Pasting this into an index.xml gives me the follow error:
Is this the error you are speaking of? Would you mind elaborating if I am doing something wrong here, I have followed your instructions to the best of my knowledge. Best, Carter
Hi Carter, Sorry, no I had copied from a non index.xml file. For index.xml it will have to be a window rather than just a view. So no this is not the error.
Still no luck, would you mind providing the entire project, or at least the necessary files to run this, eg index.js, or any other controllers. Thanks, Carter
Okay, so I have put the code in https://github.com/ClinicalSoftwareSolutions/DemoBug/tree/alloy_nested_listview branch Run alloy compile --config platform=ios and the compile will fail with:
Hi Carter. Do you now see the error using the project in GitHub?
Hello Neville, Yes, sorry about the wait, I had forgotten to update my node.js and was getting funny errors. Now we are on the same page but after messing around with your code, I do not think the nested labels are the issue here. If you remove one of them, the code still breaks, with the same error. Is the same thing happening for you? Regards, Carter
Neville, I think I understand what you are getting at, the double nesting within an itemTemplate is causing the error, not the fact that there are two labels within the view within the ItemTemplate. I will pass along to the Alloy team to see if they have any insight on this. Regards, Carter
Carter, yes that is right. I use the label inside of a view so that they can be vertically layouted. Also, I notice that you are changing the reporter on all these issues away from my name. Is there a reason. It's just that is makes it awkward for me to filter and search for issues I have reported and are interested in the progress of. No one else seems to do that.
By default, when moving a ticket to Alloy, the reporter switches to the person who moved it. And as for changing the reporter to myself on other tickets, I have spoken to my colleagues who have informed me that that way of reporting bugs is now not needed, I hadn't realized this. It used to be automatic (just how it is for alloy tickets now), that whoever moved the ticket to Ti-Mobile or Ti-Studio would become the reporter, and to keep everything consistent, this standard was continued for quite some time via manual changes for other bug types. I'll ensure from now on that you remain as the reporter and I will put a bug report through to remove the automatic assignment in Alloy tickets. Thanks for bringing that to my attention, Carter
Duplicate of ALOY-678