At 1:35 PM -0800 1/18/02, [EMAIL PROTECTED] wrote:
>Since you (Hal) use CodeWarrior Constructor and I use GCC/PilRC, I am
>not sure if you would know if my .rcp file is correct. However, I'll
>go through what is in the file anyway - the FORM section for the initial
>(and only) form has a MENUID field that refers to the menu bar and the
>referred to menu does exist. This is all I need to link the form to the
>menu, right?
There are MENU resources and MBAR (menubar) resources. Form should
point to a menubar, which then contains one or more menus.
From my boilerplate code:
menus.h
#define GenericMenuBar 1000
#define sysEditMenu 1001
#define OptionsMenu 1011
#define FormsMenu 1021
#define FormsBase 1301
#define FormsMain 1301
#define FormsBlank 1302
#define OptionsBase 1201
#define OptionsHelp 1201
#define OptionsAbout 1202
#define OptionsLicense 1204
#define OptionsReset 1205
#define sysEditMenuID 10000
#define sysEditMenuUndoCmd 10000
#define sysEditMenuCutCmd 10001
#define sysEditMenuCopyCmd 10002
#define sysEditMenuPasteCmd 10003
#define sysEditMenuSelectAllCmd 10004
#define sysEditMenuSeparator 10005
#define sysEditMenuKeyboardCmd 10006
#define sysEditMenuGraffitiCmd 10007
and in menus.r
resource 'MENU' (FormsMenu) {
FormsBase,
"Forms",
{
"Main", "M";
"Blank", "B";
}
};
resource 'MENU' (OptionsMenu) {
OptionsBase,
"Setup",
{
"Help", "?",
"About this program", "\\";
SEPARATOR, NONE;
"Licensing", "~";
"Reset preferences", "^";
}
};
resource 'MENU' (sysEditMenu) {
sysEditMenuID,
"Edit",
{
"Undo", "U";
"Cut", "X";
"Copy", "C";
"Paste", "P";
"Select All", "S";
SEPARATOR, NONE;
"Keyboard", "K";
"Graffiti", "G";
}
};
resource 'MBAR' (GenericMenuBar) {
{FormsMenu, sysEditMenu, OptionsMenu}
};
I can't remember why I'm defining the elements of the sysedit menu.
It might not be necessary.
>
>What about global variables? I have a static int array (with 60
>elements) that is global and I think when my code accesses that array is
>when POSE lets me know that I am doing something wrong.
Globals like that shouldn't be a problem (in a normal program launch,
with global access). Maybe set a breakpoint right before the access
and sniff around?
H
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/