Specifications

Chapter 31398
labelArray is an array of strings. Each string is the text for a single menu item in the pop-up menu.
valueArray is an array of strings, which should be the same length as labelArray. When a user
chooses an item from the pop-up menu, the string in this array is inserted in the users document.
If the string to be inserted is always the same as the menu label, this argument may be null.
iconArray 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
labelArray. 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 null, Dreamweaver displays the menu without icons.
doctypes is an optional argument that specifies that this menu is active for only certain
document types. You can specify
doctypes as a comma-separated list of document type IDs. See
the Dreamweaver Configuration/Documenttypes/MMDocumentTypes.xml file for a list of
Dreamweaver document types.
casesensitive specifies whether the pattern is case-sensitive. The possible values for
casesensitive are the Boolean values true or false. The value defaults to false if you omit
this argument. If
casesensitive is true, the Code Hints menu pops up only if the text that the
user types exactly matches the pattern specified by the pattern attribute. If
casesensitive is
false, the menu pops up even if the pattern is lowercase and the text is uppercase.
Returns
Nothing.
Example
If the user creates a record set called "myRs", the following code would create a menu for myRS:
dw.codeHints.addMenu(
"CodeHints_object_methods", // menu is enabled if object methods are enabled
"myRS.", // pop up menu if user types "myRS."
new Array("firstName", "lastName"), // items in drop-down menu for myRS
new Array("firstName", "lastName"), // text to actually insert in document
null, // no icons for this menu
"ASP_VB, ASP_JS"); // specific to the ASP doc types
dw.codeHints.addFunction()
Availability
Dreamweaver MX
Description
Dynamically defines a new function tag. If there is an existing function tag with the same
pattern and document type, this function replaces the existing
function tag.
Arguments
menuGroupId, pattern, {doctypes}, {casesensitive}
menuGroupId
is the ID string attribute of a menugroup tag.
pattern is a string that specifies the pattern attribute for the new function tag.
doctypes is an optional argument that specifies that this function is active for only certain
document types. You can specify
doctypes as a comma-separated list of document type IDs. See
the Dreamweaver Configuration/Documenttypes/MMDocumentTypes.xml file for a list of
Dreamweaver document types.