[comp.sys.mac.programmer] Menu Resources in ResEdit 2.0b2

spencer@osc.edu (Stephen N. Spencer) (09/21/90)

I've run in to a problem while using ResEdit 2.0b2.  I don't have the APDA-
supplied manual, only the program itself.  (Of course, that's all I've ever
had with ResEdit aside from Mark and Reed's _Macintosh Programming Primer_,
a great book but that's beside the point.)

In ResEdit 1.2, there are MENU IDs and Menu IDs (note the different spellings)
associated with each menu.  One is set where one builds the menu, the other
is set in the 'Get Info' box.  In ResEdit 2.0b2, one can only set one of these.
(This is where it gets fuzzy, I may be a little confused about which is which)
Unfortunately, in Mac code, when one does:

handle_menu(command)
long command;
{
    theMenu = HiWord(command);
    theItem = LoWord(command);

    ...
}

the value one gets in 'theMenu' isn't the ID that one can set in ResEdit.
(Seems to me that one can set a MENU ID but not a Menu ID in 2.0b2.)
I had to go back to 1.2 to be able to set the proper IDs to the proper values.

Has anyone else seen this problem?  Is there a solution?  As I said, I don't
have the ResEdit 2.0 manual available from APDA, might there be a solution to
this problem in there?

Thanks for any information, netters.


-- 
Stephen N. Spencer      | "Ho! Ha ha! Guard! Turn! Parry! 
ACCAD, 1224 Kinnear Rd. |  Dodge! Spin! Ha! Thrust! <Twang!>" - Daffy Duck
Columbus OH 43212-1163  |
spencer@cgrg.ohio-state.edu||71160.3141@compuserve.com||stephen_spencer@osu.edu

rsfinn@athena.mit.edu (Russell S. Finn) (09/29/90)

In article <926@gertie.osc.edu>, spencer@osc.edu (Stephen N. Spencer) writes:
|> In ResEdit 1.2, there are MENU IDs and Menu IDs (note the different spellings)
|> associated with each menu.  One is set where one builds the menu, the other
|> is set in the 'Get Info' box.  In ResEdit 2.0b2, one can only set one of these.
|> ...

The "MENU ID" is the ID of the resource; it is still set through the "Get Info" box (the same as for any other resource).  The "Menu ID" is a value stored as part of the resource; in ResEdit 1.2, there was a slot in the template to enter this value, but ResEdit 2.0b2 has a custom MENU editor.  If you look closely at the menu bar, you'll find that this editor adds a new "MENU" menu (!); one of the menu items allows you to set the menu ID value (as well as the menu title, if I remember correctly -- I haven't





 used it in a few weeks).

Hope this helps.  By the way, a new manual called "ResEdit Reference", which documents ResEdit 2.0b2, is now available from Addison-Wesley; you should be able to get it from any bookstore which carries Inside Macintosh.

-- Russ
rsfinn@athena.mit.edu
rsfinn@neutron.lcs.mit.edu

rsfinn@athena.mit.edu (Russell S. Finn) (10/04/90)

In article <1990Sep28.204749.4945@athena.mit.edu>, I write:
|> If you look closely at the menu bar, you'll find that this editor adds a
|> new "MENU" menu (!); one of the menu items allows you to set the menu ID
|> value (as well as the menu title, if I remember correctly...)
|> 
|> Hope this helps.  By the way, a new manual called "ResEdit Reference",
|> which documents ResEdit 2.0b2, is now available from Addison-Wesley; you
|> should be able to get it from any bookstore which carries Inside Macintosh.

Well, I went out and got my own copy of "ResEdit Reference", and sure enough,
I didn't remember correctly -- it's the Menu ID and the MenuProc ID (of
course, the latter is almost always 0; that's why it's in a dialog box,
not the main window, I suppose).  But the important info was correct.

-- Russ
rsfinn@{athena,lcs}.mit.edu