Specifications
The Dreamweaver JavaScript API 397
pattern specifies the name of the function and its argument list. For methods, the pattern
attribute describes the name of the object, the name of the method, and the method’s arguments.
For a function name, the Code Hints menu pops up when the user types
functionname(. The
menu shows the list of arguments for the function. For an object method, the Code Hints menu
pops up when the user types
objectname. (including the period). This menu shows the methods
that have been specified for the object. After that, the Code Hints menu pops up a list of the
arguments for the method in the same way it does for a function.
doctypes specifies that the menu is active only for the specified document types. This attribute
lets you specify different lists of function names for ASP-JavaScript (ASP-JS), Java Server Pages
(JSP), ColdFusion, and so on. 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 true, false or a subset of the comma-separated list that you specify for the
doctypes attribute. The list of document types lets you specify that the pattern is case-sensitive
for some document types but not for others. The value defaults to
false if you omit this
attribute. 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.
Contents
None.
Container
menugroup tag.
Example
// function example
<function pattern="CreateDate(year, month, day)" DOCTYPES="ColdFusion" />
// object method example
<function pattern="application.getAttribute(String name)" DOCTYPES="JSP" />
Code hints functions
The JavaScript Code hints API consists of four functions.
dw.codeHints.addMenu()
Availability
Dreamweaver MX
Description
This function 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}
menuGroupId is the ID attribute for one of the <menugroup> tags.
pattern is the pattern attribute for the new <menu> tag.