Problem Description
When trying to use OptionDialog.hide() the system throws an error.
Actual Result
The OptionDialog is not hidden, and the console says:
[WARN] Exception in event callback. { expressionBeginOffset = 8285; expressionCaretOffset = 8296; expressionEndOffset = 8298; line = 308; message = "Result of expression 'dialog.hide' [undefined] is not a function."; name = TypeError; sourceId = 275495048; sourceURL = "file://localhost/Users/ME/Library/Application%20Support/iPhone%20Simulator/5.0/Applications/7A1DC94A-2DD5-4726-AB88-E1567F3D9DC4/Some.app/app/ui/photos/gallery.js"; }
Expected results
The optionDialog hidden, as the docs said.
Test Case.
1. create a new mobile project
2. Add a dialog to the default window
3. Call the hide in the optionDialog
var dialog = Titanium.UI.createOptionDialog({ title:'Hoe wil je delen?', options:['Facebook', 'Twitter', 'Hyves', 'E-mail', 'Annuleren'], cancel:4 });
Ti.Gesture.addEventListener('orientationchange',function(e){ Ti.API.info(dialog); //IT RETURNS INFO ABOUT THE DIALOG dialog.hide(); });
dialog.show();
Hello, this is reported in 1.8.2, and the customer needs the fix on that version. Neeraj, can you please help us here? Best, Mauro
Duplicate of TIMOB-7656.
Closing ticket as duplicate.