Code functions
381
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.
•
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
casesensitive
is a
false
value, the menu appears even if the pattern is lowercase and the text is uppercase.
Returns
Nothing.
Example
The following example of the
dw.codeHints.addFunction()
function adds the function name
pattern
out.newLine()
to the Code Hints menu group
CodeHints_Object_Methods
and makes
it active only for
JSP
document types:
dw.codeHints.addFunction(
"CodeHints_Object_Methods",
"out.newLine()",
"JSP")
000_DW_API_Print.book Page 381 Wednesday, August 20, 2003 9:14 AM
Summary of Contents for DREAMWEAVER MX 2004
Page 1: ...Dreamweaver API Reference...
Page 24: ...24 Contents...
Page 32: ......
Page 70: ...70 Chapter 5 Fireworks Integration...
Page 76: ...76 Chapter 6 Flash Integration...
Page 116: ...116 Chapter 9 The JavaBeans API...
Page 140: ......
Page 152: ...152 Chapter 11 Application...
Page 218: ...218 Chapter 12 Workspace...
Page 248: ...248 Chapter 13 Site...
Page 292: ...292 Chapter 14 Document...
Page 378: ...378 Chapter 17 Design...
Page 430: ...430 Chapter 18 Code...
Page 486: ...486 Index...