On 9/30/06, Luc Le Blanc <[EMAIL PROTECTED]> wrote:
I have a "Connect GPS" menu item that I would like to
toggle to "Disconnect GPS" once the GPS is connected
(I would be equally happy to use a checkmark along with
a "GPS Connected" item if that was possible). Alas, a
menuOpenEvent is only sent the first time the menu is
shown, thus defeating the idea. Any trick?

are you sure menuOpenEvent is sent the first time it is
shown? you might want to check that out again :) it is
sent every time you open the menu.

i built a plugin system and when you changed the plugin
i didn't change the form - but, when you opened the window
i had to readjust the menu items. i know for sure it was
called everytime - not just the first open time :)

as for your "changing" menu - you can do this:

        // re-initialize menu in the main form
        frm = FrmGetActiveForm();
        if (connected)
          FrmSetMenu(frm, mainMenuBarNotConnected);
        else
          FrmSetMenu(frm, mainMenuBarConnected);

my original email had 3.5 specific code - i had to delete it *G*
but, above is what you need to do. define two menu's and on
frmOpenEvent: adjust your menu appropriately based on your
status. viola.

--
// Aaron Ardiri

--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to