[ALOY-1653] Runtime error on Android when using optiondialog and not declaring destructive or cancel properties
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2019-06-19T14:49:42.000+0000 |
Affected Version/s | n/a |
Fix Version/s | CLI Release 7.1.0, Alloy 1.14.0 |
Components | n/a |
Labels | regression |
Reporter | Ewan Harris |
Assignee | Ewan Harris |
Created | 2019-03-20T17:34:45.000+0000 |
Updated | 2019-06-19T14:49:42.000+0000 |
Description
Description
When running kitchensink on Android and clicking an option dialog button I'm getting the below error. It looks to be because the destructive/cancel properties aren't defined so we're setting them to null, we shouldn't set these properties if they aren't defined in the xml
[ERROR] InputEventReceiver: Exception dispatching input event.
[ERROR] E/MessageQueue-JNI: Exception in MessageQueue callback: handleReceiveCallback
[ERROR] E/MessageQueue-JNI: java.lang.NumberFormatException: Unable to convert null
[ERROR] E/MessageQueue-JNI: at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:419)
[ERROR] E/MessageQueue-JNI: at ti.modules.titanium.ui.widget.TiUIDialog.handleEvent(TiUIDialog.java:364)
[ERROR] E/MessageQueue-JNI: at ti.modules.titanium.ui.widget.TiUIDialog$1.onClick(TiUIDialog.java:122)
Steps to reproduce
1. Build kitchensink 2. Click option dialog 3. Open the option dialog 4. Select an optionActual
Above errorExpected
No errorComments
- Ewan Harris 2019-03-21 https://github.com/appcelerator/alloy/pull/926
- Samir Mohammed 2019-06-19
*Closing ticket*, Fix verified in CLI Version
7.1.0-master.21
No runtime error was seen on KitchenSink-v2 when testing the 'option dialog' section. *Test Steps* 1. Built kitchensink-v2 2. Clicked on the option dialog 3. Opened the option dialog 4. Selected an option 5. Able to see no run time error and the console displayed its index number (selected each option)
*Test Environment*[INFO] Ti.UI.OptionDialog selected option at index: 1 [INFO] Ti.UI.OptionDialog selected option at index: 2 [INFO] Ti.UI.OptionDialog selected option at index: 0
SDK: 8.0.2.GA Operating System Name = Mac OS X Version = 10.14.4 Architecture = 64bit CPUs = 8 Memory = 16.0GB Node.js Node.js Version = 10.13.0 npm Version = 6.4.1 Appcelerator CLI Installer = 4.2.14-3 Core Package = 7.1.0-master.21 Titanium CLI CLI Version = 5.2.1 node-appc Version = 0.2.49