getSelectedValue(message, texts)
This method will put message as the current shown text, and show the user various options for him to choose one. This method will wait until the user selects an option, and when he does, the index of the option he selected in the list texts will be returned.
showButton(label) and showButton(label, timeout)
This method will show a button with the text 'label' on it, and will wait until the user clicks on it. Note that you can specify a second parameter 'timeout', that will be a number of seconds. In that last case, showButton will wait until the user clicks the button or 'timeout' seconds have elapsed. It will return the number of seconds that the user take to click the button, or 'timeout' if this second parameter exists and the user's not clicked the button before the timeout has elapsed.
I'm not a programmer but is there a way or possibility to chance the getSelectedValue(message, texts) into something like:
getSelectedValue(message, texts, timeout)?
I do want the thirth parameter timeout or a closure example which does the same. Please help.
|