// this needs to get executed on the Open event of the window...because the ActionBar will // become available after the activity has launched. function onOpenWindow(){ ABH=require('actionbarhelper').actionBarHelper; actionBarHelper=new ABH($.win_name); actionBarHelper.reloadMenu(); // this forces the actionbar to show menu options from XML actionBarHelper.setUpAction(function(){ $.win_name.close(); }) actionBarHelper.setTitle('New Window'); }