Adobe 38040334 - Dreamweaver CS3 User Manual page 140

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

commandButtons()
Description
This function defines the buttons that should appear on the right side of the Options dialog box and their behaviors
when they are clicked. If this function is not defined, no buttons appear, and the body section of the command file
expands to fill the entire dialog box.
Arguments
None.
Returns
Dreamweaver expects an array that contains an even number of elements. The first element is a string that contains
the label for the topmost button. The second element is a string of JavaScript code that defines the behavior of the
topmost button when it is clicked. The remaining elements define additional buttons in the same way.
Example
The following instance of
commandButtons()
function commandButtons(){
return new Array("OK" , "doCommand()" , "Cancel" , ¬
"window.close()" , "Help" , "showHelp()");
}
isDOMRequired()
Description
This function determines whether the command requires a valid DOM to operate. If this function returns a value of
or if the function is not defined, Dreamweaver assumes that the command requires a valid DOM and synchro-
true
nizes the Design and Code views of the document before executing. Synchronization causes all edits in the Code
view to update in the Design view.
Arguments
None.
Returns
Dreamweaver expects a
true
receiveArguments()
Description
This function processes any arguments that pass from a menu item or from the
Arguments
{arg1}, {arg2},...{argN}
• If the
attribute is defined for a
arguments
function as one or more arguments. Arguments can also pass to a command by the
ments()
function.
defines three buttons: OK, Cancel, and Help:
value if a command requires a valid DOM to operate;
tag, the value of that attribute passes to the
menuitem
DREAMWEAVER CS3
Extending Dreamweaver
otherwise.
false
function.
dw.runCommand()
receiveArgu-
dw.runCommand()
134

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents