Macromedia dreamweaver 8-extending dreamweaver User Manual

Page of 504
The Menu Commands API
213
If the 
arguments
 attribute is defined for a 
menuitem
 tag, the value of that attribute passes 
to the 
setMenuText()
 function (and to the 
 functions) as one or more arguments. 
The 
arguments
 attribute is useful for distinguishing between two menu items that call the 
same menu command.
Returns
Dreamweaver expects the string that should appear in the menu.
Example
function setMenuText()
{
if (arguments.length != 1) return "";
var whatToDo = arguments[0];
if (whatToDo == "undo")
return dw.getUndoText();
else if (whatToDo == "redo")
return dw.getRedoText();
else return "";
}
windowDimensions()
Description
Sets specific dimensions for the Parameters dialog box. If this function is not defined, the 
window dimensions are computed automatically.
Arguments
platform
The value of the 
platform 
argument is either 
"macintosh"
 or 
"windows"
, depending on 
the user’s platform.
Returns
Dreamweaver expects a string of the form 
"widthInPixels,heightInPixels"
.
The returned dimensions are smaller than the size of the entire dialog box because they do not 
include the area for the OK and Cancel buttons. If the returned dimensions do not 
accommodate all options, scroll bars appear.
NO
TE
Do not define this function unless you want a dialog box that is larger than 640 x 480 
pixels.