[ALOY-1055] iOS: build fails using a ScrollableView that contains a ListView using Templates
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-06-30T20:25:01.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.5.0 |
Components | XML |
Labels | qe-3.3.0, qe-closed-3.4.0, qe-manualtest, qe-testadded |
Reporter | Matej |
Assignee | Tim Poulsen |
Created | 2014-06-17T18:02:40.000+0000 |
Updated | 2014-08-20T09:47:16.000+0000 |
Description
It is not possible to put ListView with Templates inside a ScrollableView. Application will throw an error:
[ERROR] : Script Error {
[ERROR] : backtrace = "#0 () at file:///.../myApp.app/alloy.js:231";
[ERROR] : line = 58;
[ERROR] : message = "-[NSNull krollObjectForBridge:]: unrecognized selector sent to instance 0x45c3068";
[ERROR] : sourceId = 301210048;
[ERROR] : sourceURL = "file:///.../myApp.app/alloy/controllers/index.js";
[ERROR] : }
index.xml
<Alloy>
<Window>
<ScrollableView>
<ListView defaultItemTemplate="template">
<Templates> <!-- Does work without Templates-->
<ItemTemplate name="template">
<ImageView bindId="pic" id="icon"/>
<Label bindId="info" id="title"/>
<Label bindId="es_info" id="subtitle"/>
</ItemTemplate>
</Templates>
</ListView>
</ScrollableView>
</Window>
</Alloy>
Discussion: http://developer.appcelerator.com/question/175229/-nsnull-krollobjectforbridge-unrecognized-selector-sent-to-instance-0x45c3068
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2014-06-18 at 2.24.27 PM.png | 2014-06-18T23:11:35.000+0000 | 76093 |
seems a small bug here. For now, you'd better use view as the parent level, and I will notice to our engineer team to take care of this bug.
I can reproduce this problem with: Ti 3.3.0.RC, iOS Simulator 7.1
[~fcasali] Could you take a look and see if you can narrow down root cause? I asked if you could determine if regression, but Sam mentions he can see it with 3.3.0, so that combined with the reported affected version of 3.2.3 (assuming alloy 1.3.1 here) makes me think not a regression in the SDK nor Alloy, but not sure before 3.2.3 or 1.3.1.
PR: https://github.com/appcelerator/alloy/pull/464 Test app: https://github.com/skypanther/alloy/tree/ALOY-1055/test/apps/testing/ALOY-1055 Plus, also test using the ui/listview test app Both should run without error and display the listviews. The 1055 test app should display the listview (which has templates) within the scrollable view, swipe right for the second view, which also contains a listview (without a template).
I have got one question. If I do something like this:
And then in the widget I'll check
arguments[0].children
it containsItemTemplates
and as the last thing is the ListView. Is it normal? It shouldn't work like this or am I wrong?[~sko] That appears to be an unrelated issue with the ListView parser. I've added ALOY-1064 to describe and track the issue you noted. On that ticket, I noted a workaround: reference the children array like this:
Tim Poulsen, yes I know sorry for that I just wanted to know if that's really an issue or normal behaviour.
PR merged
Environment - Appc Studio - 3.4.0.201408180158 SDK - 3.4.0.v20140819094113 acs - 1.0.16 alloy - 1.5.0-dev npm - 1.3.2 titanium - 3.4.0-dev titanium-code-processor - 1.1.1 OS - mavericks (v10.9.4) Xcode - 6Beta5 Device - iPhone5(v7.1.2), Nexus5(v54.4.4) Result - Tested both the apps (test/apps/testing/ALOY-1055 and ui/listview). Both apps run without error and display the listviews. Hence closing this issue.