[comp.sys.mac] ApplicationMenu Init

campoly@violet.berkeley.edu (Mr. Science) (01/12/88)

I am having trouble getting the ApplicationMenu Init to work with an
application that I have written.  ApplicationMenu works fine with other
programs on my system, but not in my program.

I read Larry Rosenstein's article about how the Init works.  My program
does support the standard apple menu.  The applications in memory are
listed between dotted lines right after the DAs.  But when I click to the
right of the icon in the menu bar or command click in some blank area of
the menu bar -- NOTHING.  I switch to another program and ApplicationMenu
works fine.

Why doesn't it work in my program?  My program is not MultiFinder-aware,
but ApplicationMenu works with other programs that aren't (such as MacDraw).
I tried adding a SIZE -1 resource, but that didn't help.

I have tried running tests using both LightSpeed C and LS Pascal.  I
set up the apple menu by using a template with just an About... item
and a dashed line.  Then I call AddResMenu to add all 'DRVR' resources.
I display the menu bar.  MenuSelect is called whenever there is a
mouseDown event for which FindWindow returns a code of inMenuBar. 

Am I doing something wrong?  I assume that ApplicationMenu is activated
when MenuSelect is called with the mouse and/or command key in the
proper state.  I'm running on a SE HD20.

Please respond by e-mail.  Any help will be greatly appreciated.  Thanks.

 
  Gregory Dow			ARPA:   campoly@violet.berkeley.edu
  Chemical Engineering Dept.	UUCP:   {uwvax, decvax, ihnp4, ...}!ucbvax
  University of California	          !campoly%violet.berkeley.edu
  Berkeley, CA  94720		BITNET: POLYDOW@UCBCMSA