Answering my own question here...
What I appear to missing are brain cells.
When 'makeMenu' is called you then have a pointer to 'menu'
and anywhere within the 'makeMenu' override while you are
creating your MenuItems you can just call...
menu.setDefault( (MenuItem) my_menu_item );
If you want to set/change the default menu item AFTER
'makeMenu' or at some other run-time point within your
application then all you have to do is 'remember' what
the last 'menu' handle was passed to the last 'makeMenu'
method.
Create yourself a 'global' that can seen from all 'screens'
such as...
static Menu _menu = null;
...and then every time 'makeMenu' is called anywhere
in your application just update it with the 'Menu'
pointer being passed to you by 'makeMenu'...
_menu = menu;
Then, from anywhere in your application, as long as you
have also saved the 'MenuItem' handles for your own
menu items saved to globals as well you can just call...
_menu.setDefault( (MenuItem) my_menu_item ); |