MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Specifikace Strana 213

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 504
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 212
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 canAcceptCommand(),
isCommandChecked(), and receiveArguments() 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 users 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.
NOTE
Do not define this function unless you want a dialog box that is larger than 640 x 480
pixels.
Zobrazit stránku 212
1 2 ... 208 209 210 211 212 213 214 215 216 217 218 ... 503 504

Komentáře k této Příručce

Žádné komentáře