Code functions
491
■
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.
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
dreamweaver.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}
■
The
menuGroupId
argument is the ID string attribute of a
menugroup
tag.
■
The
pattern
argument is a string that specifies the pattern attribute for the new
function
tag.
■
The
doctypes
argument, which is optional, specifies that this function 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.
000_DW_API_Print.book Page 491 Wednesday, July 20, 2005 11:58 AM
Summary of Contents for DREAMWEAVER 8-DREAMWEAVER API
Page 1: ...Dreamweaver API Reference...
Page 16: ......
Page 28: ...28 The File I O API...
Page 38: ...38 The HTTP API...
Page 68: ...68 Flash Integration...
Page 100: ...100 The Database API...
Page 116: ...116 The JavaBeans API...
Page 144: ...144 The Source Control Integration API...
Page 146: ......
Page 254: ...254 Workspace...
Page 298: ...298 Site...
Page 354: ...354 Document...
Page 396: ...396 Page Content...
Page 488: ...488 Design...
Page 550: ...550 Code...