beautypg.com

Adobe Dreamweaver API Reference CS5 User Manual

Page 446

background image

441

DREAMWEAVER API REFERENCE

Code

Last updated 8/27/2013

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 must be of 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 document. If the string to be inserted is always the same as the menu label, this argument can 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. This menu

appears only if the text that the user types 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.

The

object

argument specifies the name of the string. This argument is optional. It is used when the object is of

type "static."

The

descriptionArray

argument describes in detail the items that appear in code hints. This argument is

optional.

The

dismissChars

argument specifies the nonstandard characters that the user types to dismiss the Code Hints

menu. This argument is optional.

The

allowWhitespacePrefix

argument is a Boolean value that allows whitespace before the hint. This argument

is optional and the default value is

false

.

The

restriction

argument is a string. This argument is optional and if not specified it does not place any

constraint. On a web page that contains both client-side and server-side languages, you can use this argument to
restrict the use of code hints to one of the following:

A specific language section

A code block

The

type

argument is used to define user interface menu types. This argument is optional and the default value is

"Enumerated drop down UI." Other possible values are

color

,

font

, and

url

.

The

bForcedOnly

is a Boolean value. If

true

, the Code Hints menu pops up only when the keyboard shortcut

(Ctrl+Space) is used. This argument is optional and the default value is

false

.

The

allowMultipleTimes

argument is a Boolean value. If

true

, it allows the same menu to pop up multiple times.

This argument is optional and the default value is

false

.

The

docURI

argument enables the user to constrain the code hints to a specific document by providing the

document URI (native OS file path). This argument is optional and if the document URI is not specified, it does
not impose any constraint.

The

alias

argument enables the user to invoke code hints with an alternate pattern other than the one listed in

pattern or classpattern argument. This argument is optional.