sem8019@cs.rit.edu (Sigrid E Mortensen) (06/07/91)
I have defined my own menu data structure to hold some extra information. In the process, I also decided to make the list of items a linked-list. In other words, it is not at all like the original (string for the menu title and item list) data structure. I borrowed and modified the DSP sample code "Concordia" for composing my menu definition procedure, and ALMOST everything works. The one remaining difficulty is with hierarchical menus. Although I can detect the presence of a submenu enough to draw the right arrow, my custom menu does not recognize any submenus in the "mChooseMsg;" the submenu does not pop up to allow an item from it to be chosen. My interpretation is that this is a problem with the Mac knowing that the submenu is there (in order to send IT the choose message). Since my data structure has changed so, the Mac cannot be expected to know that there is a submenu there that needs to be popped up. My questions are: 1) Is there some way to let the Mac know that the submenu is there? 2) If not, should I pop up the menu myself? (I tried this, and it crashed. One problem then is how to send the information back to the Mac and my calling program that a) the original menu must be closed up and b) the menu in which an item was selected was the submenu, not the "owner" menu. 3) Barring all the above solutions, do I need to write my own menu BAR definition procedure to handle my own hierarchical menus? 4) If so, is there any sample C code publicly available to guide a person in doing this? Any help you can give would be greatly appreciated. -- Sigrid Mortensen sem8019@cs.rit.edu
peterc@sugar.hackercorp.com (Peter Creath) (06/07/91)
Well, folks, I'm getting pretty desperate. I know you can change the fonts of a menu (Suitcase II does it if you hold down opt key while viewing a font menu), but I'm beginning to thing you need a special MDEF to do it. How do I write an MDEF? I'd appreciate the source code (mailed to me of course) to a basic pop-up MDEF. My system has a CDEF archived around here somewhere, but since this is home-brew software that the system is running (thus the strange news headers, etc), it can't seem to find the right file to download. So, if someone can send me the source, I'd be very grateful, and when I'm done, I'll post the source code (with my mods) as public domain. peterc@sugar.neosoft.com "Listen, there's a hell of a good peterc@sugar.hackercorp.com universe next door. Let's go!" (take your pick) -e e cummings --