[TIMOB-19123] Ti.UI.OptionDialog crashes with unknown exception
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2015-07-01T18:40:02.000+0000 |
Affected Version/s | Release 4.1.0 |
Fix Version/s | Release 4.1.0 |
Components | Windows |
Labels | n/a |
Reporter | Fokke Zandbergen |
Assignee | Christopher Williams |
Created | 2015-07-01T08:39:02.000+0000 |
Updated | 2015-07-06T21:46:02.000+0000 |
Description
Both the test app in the Windows repo:
https://github.com/appcelerator/titanium_mobile_windows/blob/master/test/app/optiondialog_test.js
And the example in the docs:
http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.OptionDialog
Crash with an unknown exception:
-- Start application log -----------------------------------------------------
[INFO] Finished launching the application
[INFO] Waiting for app to connect to log relay
[ERROR] Application Error: "Runtime Error during click event: unknown exception"
Attachments
File | Date | Size |
---|---|---|
Screen Shot 2015-07-01 at 10.36.51.png | 2015-07-01T08:38:56.000+0000 | 39678 |
https://github.com/appcelerator/titanium_mobile_windows/pull/343
Turns out that this suffers from the same errors and limitations as AlertDialog. So the fix I posted is good, but the issue originally reported is effectively a duplicate of TIMOB-19065 Windows just throws an exception when you try to open a message dialog with "too many" buttons. It appears that limit on the phone is effectively 2 buttons, any more and it throws a runtime exception. Obviously that sucks. We may need to look into alternate implementations using some other UI widgets that allow for more options.
Could we proactively detect this situation and throw a friendlier error?
Verified the fix. Instead of an exception the list is truncates to 2. We get this in the logs:
Closing. Environment: Appc Studio: 4.1.0.201507061234 Ti SDK: 4.1.0.v20150706111546 Ti CLI: 4.0.1 Alloy: 1.6.2 Windows: 8.1 Enterprise 64-bit APPC NPM: 4.1.0-1 APPC CLI: 4.1.0-5 Device: Nokia Lumia 928 - Windows Phone 8.1 Windows emulator : 8.1