This function sets the OK action to use on WM.
setOKAction( callback )
Name | Type | Description |
callback | anonymous.genericCallbackFunction | The function to call when the OK button is pressed. |
var callbackFunctionName = function() { alert( "Menu item clicked!" ); } var okActionFunction = function() { alert( "A OKAY!" ); } var menuItemCollection = new hwc.MenuItemCollection(); menuItemCollection.setOKAction( "okActionFunction()" ); menuItemCollection.addMenuItem("menu item name", "callbackFunctionName()");