No, but when I inspect the FormPtr returned by FrmGetActiveForm(), its
formId value identifies the correct form.  As an experiment, I added
FrmSetActiveForm(FrmGetFormPtr(1000)) just before the FrmSetMenu() call, and
the error still occurred.  

Since I call FrmSetMenu() in the frmOpenEvent, calling FrmSetActiveForm() is
redundant, isn't it?

Keep the ideas coming!

-----Original Message-----
From: Borislav Kolev 
Sent: Tuesday, October 31, 2000 2:12 PM
To: Palm Developer Forum
Subject: RE: FrmSetMenu


To start with, do you call FrmSetActiveForm(frmP) before the GetActiveForm()
call?

- bobby

-----Original Message-----
From: Gregg Zigler [mailto:[EMAIL PROTECTED]]

Sent: Tuesday, October 31, 2000 3:57 PM
To: Palm Developer Forum
Subject: FrmSetMenu


I want to switch between two menu bars at runtime.  In Metrowerks
Constructor, two menu bar resources are defined with IDs of 1000 and 1100,
and the form's menu bar ID is set to 1000.

When handling the frmOpenEvent, my application naively calls

        FrmSetMenu (FrmGetActiveForm(), 1100);

This call does not directly produce an error message.  However, when I tap
on the menu icon to use the new menu, the following error message appears:

        "My-application-name has just read directly from memory manager data
structures."

Pressing the debug button leads to an error somewhere in MenuHandleEvent.
What do I need to do to use FrmSetMenu?


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

Reply via email to