User Guide

380 Chapter 18: Code
dreamweaver.codeHints.addMenu()
Availability
Dreamweaver MX.
Description
Dynamically defines a new menu tag in the CodeHints.xml file. If there is an existing menu tag
that has the same pattern and document type, this function adds items to the existing menu.
Arguments
menuGroupId, pattern, labelArray, {valueArray}, {iconArray}, {doctypes},
{casesensitive}
The menuGroupId argument is the ID attribute for one of the menugroup tags.
The pattern argument is the pattern attribute for the new menu tag.
The labelArray argument is an array of strings. Each string is the text for a single menu item
in the pop-up menu.
The valueArray argument, which is optional, is an array of strings, which should be the same
length as the
labelArray argument. When a user selects an item from the pop-up menu, the
string in this array is inserted in the user’s document. If the string to be inserted is always the
same as the menu label, this argument might have a
null value.
The iconArray argument, which is optional, is either a string or an array of strings. If it is a
string, it specifies the URL for a single image file that Dreamweaver uses for all items in the
menu. If it is an array of strings, it must be the same length as the
labelArray argument. Each
string is a URL, relative to the Dreamweaver Configuration folder, for an image file that
Dreamweaver uses as an icon for the corresponding menu item. If this argument is a
null
value, Dreamweaver displays the menu without icons.
The doctypes argument, which is optional, specifies that this menu is active for only certain
document types. You can specify the
doctypes argument as a comma-separated list of
document type IDs. For a list of Dreamweaver document types, see the Dreamweaver
Configuration/Documenttypes/MMDocumentTypes.xml file.
The casesensitive argument, which is optional, specifies whether the pattern is case-
sensitive. The possible values for the
casesensitive argument are the Boolean values true or
false. The value defaults to false if you omit this argument. If the casesensitive
argument is a
true value, the Code Hints menu appears only if the text that the user types
exactly matches the pattern that the pattern attribute specifies. If the casesensitive
argument is a
false value, the menu appears even if the pattern is lowercase and the text
is uppercase.
Returns
Nothing.
000_DW_API_Print.book Page 380 Wednesday, August 20, 2003 9:14 AM