Digital Alchemy Mercutio MDEF


* Overview
* Inside Mercutio(pdf)
* Internationalization
* Licensing Description
* Software License(pdf)

* Current version: 1.5.1
* Download Now!
* Release Notes
* Known Problems
* Version History

* Register!
* Registered Users

* Technical Support
* Mailing Lists
* Report a Bug


Frequently Asked Questions (FAQ)

Common symptoms and remedies

If you run into difficulties getting up and running with Mercutio, these tips may help you overcome them.
Does Mercutio work with all menus?
All menus except the Apple menu, which is treated differently by the Menu Manager and cannot be controlled by application-specific MDEFs. Popup menus work fine.

My key equivalents aren't being caught by MDEF_MenuKey.
Make sure you are passing a Mercutio menu (a menuHandle to a menu that uses the MDEF) into the call to MDEF_MenuKey. The Apple menu may not be used as a Mercutio menu.

Some of my key equivalents have become page up/down, function keys, etc.!
Mercutio maps lowercase key equivalent characters to non-printing keys such as page up/down (See "Support for non-printing key-equivalents" on page 16.) If you installed Mercutio and are getting these key equivalents unexpectedly, make sure the characters in the keyEq field of the menu items are uppercase, not lowercase.

The width/height of my menu is all screwed up!
Make sure you call CalcMenuSize after you set the preferences for a given menu.

My callback routine isn't being called!
Check the MenuPrefsRec or Xmnu resource for that menu to make sure that the useCallbackFlag field has a style associated with it.

Make sure the menu item(s) in question have that style bit set.

Make sure you've called MDEF_SetCallbackProc to link your procedure to that menu. Remember that you need to do this for every menu that uses that procedure.

My menu item isn't appearing in the correct text style.
If that style is missing, you are probably using it as a feature flag. Check the MenuPrefsRec or Xmnu resource for that menu.

All I get is the Shift- and Option- modifiers.
Remember that the only features that work "out of the box" are Shift- and Option-. If you want your menus to support the Control-key, dynamic items, or item callbacks, you must set those preferences with MDEF_SetMenuPrefs. See "MenuPrefsRec" on page 8.

My menu items have extra modifier keys.
You have some extra feature flags set. Check the MenuPrefsRec or Xmnu resource for that menu, as wells as the style bit settings for the menu items in question.

How can I have different key equivalent characters in the alternates for a given dynamic item?
You can't.

The modifier keys show up correctly, but the menu doesn't respond to keypresses
Make sure you are calling MDEF_MenuKey, not the Toolbox MenuKey routine.

Make sure the last parameter to MDEF_MenuKey is a menuHandle for a menu that uses Mercutio.

ResEdit complains about illegal fields in the Xmnu TMPL resource.
You're probably using the TMPL resource designed for Resorcerer. Copy a fresh on from the "Xmnu Template for Resedit" file.

My icons are being drawn smaller than normal.
Check the resource ID of the icons in question. Remember that, by default, Mercutio draws any icon with a resource ID between 500 and 512 as a small icon. This range can be change programmatically--See "Support for small icons" on page 12.

My popup menu isn't appearing in Geneva 9 point anymore
Version 1.3 now supports drawing popup menus in the window font. Look at the Sample Code to see how this is done. If the routines from the Sample Code don't work for you, contact us.

Other Frequently Asked Questions

If you have other questions about Mercutio, these may answer them for you. If not, please feel free to contact Digital Alchemy directly.

What menu do I need to pass into the API routines??
You can pass any menu that uses Mercutio. The menu parameter that all the API routines have simply gives them a way to find Mercutio by examining the MDEF field of the menuHandle.

Our product includes three applications that use Mercutio. How many licenses do we need?
Three--a single license covers a single Macintosh application. However, to take advantage of the Poor Man's License, you only need to send one copy of the product, assuming it includes all three applications.

The credit information should be in all three About boxes and user manuals.

Does the license include upgrades to Mercutio?
Yes. As long as you abide by the terms of the license, you can use any future versions of Mercutio.

What about upgrades to my product?
If you are taking advantage of the Poor Man's License, you should send me a copy whenever you release a product upgrade.

What text needs to be displayed in the About box / user manual?
Use MDEF_GetCopyright to get the correct copyright notice.

Why is this thing called "Mercutio" anyway?
When I first started programming Mercutio, I was taking a Shakespeare class at Stanford. Part of the class included playing out selected scenes from the plays we were reading; I played Mercutio, Romeo's hothead brother, and was pretty immersed in the character at the time.

What was the "Shakespeare MDEF Collection" and what happened to it?
Mercutio 1.0 was first released in early 1992. Many developers requested features such as additional modifier keys and support for non alphanumeric key-equivalents. Including all of the features in a single MDEF would have used up all of the style bits; the Shakespeare MDEF Collection was to address these requests by providing a suite of MDEFs with a variety of feature combinations. We subsequently came upon the idea of storing the style-bit-to-feature mapping external to the MDEF, which allowed us to provide all the features and still let developers choose which style-bits to give up. This obviated the need for a collection of MDEFs.

The Shakespeare MDEF Collection may still make an appearance sometime in the future once it becomes unrealistic to add more features to Mercutio. Until then, however, we'll leave it to the Halls of Vaporware fame!

Last modified by RMF at 22:32 PM on 05/18/1998. © Copyright 1996-2000, Digital Alchemy, All Rights Reserved.
This site was built on a Macintosh using BBEdit and CometPage.