Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-6901] API: UI - provide optionDialog cancel event for when no button is selected

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusClosed
ResolutionFixed
Resolution Date2018-01-03T03:34:59.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTiAPI
Labelsn/a
ReporterIvan Skugor
AssigneeMaggie Chen
Created2011-12-23T04:10:18.000+0000
Updated2018-01-03T03:34:59.000+0000

Description

Problem

Currently the way to check whether the hardware back button has been pressed when an optionDialog has been displayed is verbose. Also, the action of clicking this button means the same as clicking the optionDialog's cancel button, so it would be beneficial to have a more literal event to handle the situation is canceled, regardless of whether that is by using the hardware back button or clicking the cancel button of the optionDialog.

Request / Solution

Redevelop "cancel" functionality of optionDialog so that it supports new "cancel" event instead of "cancel" property in "click" event, to handle situations where no option is selected.

Justification

Convenience and shorter JS code The advantage is that we will be able to do action when both "cancel" option is selected and hardware back-button is pressed, and on the other hand in "click" event listener we won't have to check if "cancel" opinion was clicked to do no action (so, "cancel" option would not produce "click" event).

Comments

  1. Paul Dowsett 2011-12-23

    Ivan If I understand this request correctly, while I admit this functionality would be convenient, the functionality is already available in Titanium to achieve this and the code is quite trivial. With this in mind, I will personally ask the engineering team if they think this is worthwhile, and move it across to the main project if they do. I will let you know the response. Thanks for the suggestion.

JSON Source