User Tools

Site Tools


built_in:yesnodialog

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

built_in:yesnodialog [2018/05/27 14:26]
geez437 [Table]
built_in:yesnodialog [2018/05/28 00:23]
Line 1: Line 1:
-====== YesNoDialog ====== 
- 
-===== Methods ===== 
-^ Method                         ^ Description                                                ^ 
-| .GetType( )                    |                                                            | 
-| .Show( )                       | Show YesNoDialog                                           | 
-| .SetButtonText ( str1, str2 )  | Customize button text; default: str1 = "Yes", str2 = "No"  | 
-| .SetOnTouch( callback )        | Calls callback after hitting "Yes" or "No"                 | 
-|                                |                                                            | 
- 
-<file javascript yesNoDialog.js> 
- 
-//Called when application is started. 
-function OnStart() 
-{ 
-   trial = app.CreateYesNoDialog( "Trial Y/N" ); 
-   trial.SetOnTouch( tapped ); 
-   trial.Show(); 
- 
-} 
- 
-function tapped(button){ 
- 
-alert("Only " + arguments.length + " Argument(s) Available."); 
- 
-switch (button) 
-{ 
-case "Yes": 
-alert("\"Yes\" was chosen"); 
-break; 
- 
-case "No": 
-alert("\"No\" was chosen"); 
-break; 
- 
-} 
- 
-alert("Control Type: "  
-  + trial.GetType()); 
- 
-app.Exit(); 
-} 
- 
-</file> 
- 
-===== Options ===== 
- 
-^ Option       ^ Description                                          ^ 
-| ShowNow      | Shows the dialog directly (whithout calling Show())  | 
  
built_in/yesnodialog.txt · Last modified: 2018/05/28 00:23 (external edit)