[ALOY-912] Alloy 1.3.0 ignores formfactor in headerView - leads in crash
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-01-07T20:39:59.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Alloy 1.3.1 |
Components | XML |
Labels | alloy, qe-testadded |
Reporter | Jick Steen |
Assignee | Tony Lukasavage |
Created | 2013-11-19T07:58:38.000+0000 |
Updated | 2014-07-31T18:24:45.000+0000 |
Description
Hi,
just upgraded to latest Alloy master version and noticed a crash when a headerView is only used for instance on a tablet:
$.index.open();
<Alloy>
<Window class="container">
<TableView>
<HeaderView formFactor="tablet">
<View>
<Label>Text</Label>
</View>
</HeaderView>
</TableView>
</Window>
</Alloy>
Tested on Android 4.1.3 with Samsung Galaxy S2. Problem is it only creates the HeaderView on tablets but always wants to set the headerView property even on handhelds where the headerView does not exist.
Environment
- OSX 10.8.5 - iOS Simulator 7.0 - Xcode 5.0.1 - Latest Titanium SDK: 3.2.0.v20131108155642 - Latest Titanium CLI Master 3.2.0 - Latest Alloy Master 1.3.0 Link to Q&A: [http://developer.appcelerator.com/question/159540/alloy-130-ignores-formfactor-in-headerview---leads-in-crash]Attachments
File | Date | Size |
---|---|---|
logs.txt | 2013-12-29T11:05:40.000+0000 | 17331 |
FYI: As I can release my app only having this fixed, I had a look to fix it. It seems to work for me but I guess it is not really a proper fix. What I basically did is assigning ProxyProperties that have a condition after creating the TableView instance. Because it looks like assigning
or
both leads in a crash on Android.
Hi, After testing the code on several tablets and Android phones, from 2.2 to 4.2, I was not able to reproduce this issue. The "Test" text properly showed up on tablets and not on phones. I did not witness a crash with Ti SDK 3.1.3 or 3.2. Can you please try out the latest nightly build of the TISDK and let us know an update if you continue to get this crashed. Thanks,
Strange, I still can reproduce the issue: http://pastebin.com/0REU3sBg alloy --version = 1.3.0 (Just updated to latest master using
) titanium --version = 3.3.0 (Just updated to latest master) Host OS: Mac OS X OS Version: 10.8.5 OS Arch: x86 JRE Version: 1.6.0_65 Titanium Studio Version: 3.2.1.201312142230 Latest Titanium SDK: 3.2.0.v20131216191854 Android SDK Version: 4.4 Android NDK Version: Unknown/Uninstalled Titanium CLI Enabled: true Tested on Samsung Galaxy S2 with Android 4.1.2 Generated controller code looks like this: http://pastebin.com/LkMzM6vq Notice line 28 where headerView is asigned but only generated for tablets in line 15.
commit: https://github.com/appcelerator/alloy/pull/296 test app: https://github.com/appcelerator/alloy/tree/master/test/apps/testing/ALOY-912 Merged in master and 1_3_X Functional testing can be done on the app in the comments, or on the test app listed here. Both simply need to be run on android and not produce a runtime error. Before this fix, a runtime error would occur on android.
Verified fixed. TiSDK 3.2.1.v20140106195644 Appcelerator Studio 3.2.1.201401061716 Alloy 1.3.1-beta2 Android Google Nexus Galaxy 4.3 iPhone 5 iOS7 Closing
Verified as fixed. TiSDK 3.2.1.v20140203174850 Alloy 1.3.1-cr2 CLI 3.2.1-beta3 Appcelerator Studio 3.2.1.201402041206 iPhone 5 iOS 7 Android Google Nexus Galaxy 4.3 Closing