MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Spezifikationen Seite 199

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 504
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 198
A simple menu command example 199
function canAcceptCommand()
{
var selarray;
if (arguments.length != 1) return false;
var bResult = false;
var whatToDo = arguments[0];
if (whatToDo == "undo")
{
bResult = dw.canUndo();
}
else if (whatToDo == "redo")
{
bResult = dw.canRedo();
}
return bResult;
}
receiveArguments()
Dreamweaver calls the receiveArguments() function to process any arguments that you
defined for the
menuitem tag. For the Undo and Redo menu items, the receiveArguments()
function calls either the
dw.undo() function or the dw.redo() function, depending on
whether the value of the argument,
arguments[0], is "undo" or "redo". The dw.undo()
function undoes the previous step that the user performed in the document window, dialog
box, or panel that has focus. The
dw.redo() function redoes the last operation that was
undone.
The
receiveArguments() function looks like the following example code:
function receiveArguments()
{
if (arguments.length != 1) return;
var whatToDo = arguments[0];
if (whatToDo == "undo")
{
dw.undo();
}
else if (whatToDo == "redo")
{
dw.redo();
}
}
Seitenansicht 198
1 2 ... 194 195 196 197 198 199 200 201 202 203 204 ... 503 504

Kommentare zu diesen Handbüchern

Keine Kommentare