Macromedia dreamweaver 8-extending dreamweaver User Manual
196
Menus and Menu Commands
The command is renamed in the Commands menu.
To delete a command you’ve created:
1.
Select Commands > Edit Command List.
A dialog box appears, listing all the commands you can delete. (Commands that are in the
default Commands menu don’t appear on this list and can’t be deleted using this
approach.)
default Commands menu don’t appear on this list and can’t be deleted using this
approach.)
2.
Select a command to delete.
3.
Click Delete, and then confirm that you want to delete the command.
The command is deleted. The file that contains the code for the command is also deleted;
deleting a command does not simply remove the menu command from the menu. Be
certain that you really want to delete the command before you use this approach. If you
want to remove it from the Commands menu without deleting the file, you can find the
file in Configuration/Commands and move it to another folder.
deleting a command does not simply remove the menu command from the menu. Be
certain that you really want to delete the command before you use this approach. If you
want to remove it from the Commands menu without deleting the file, you can find the
file in Configuration/Commands and move it to another folder.
4.
Click Close.
How menu commands work
When the user clicks a menu with a menu item that contains a menu command, the following
events occur:
events occur:
1.
If any
menuitem
tag in the menu contains the
dynamic
attribute, Dreamweaver calls the
getDynamicContent()
function in the associated Menu Commands file to populate the
menu.
2.
Dreamweaver calls the
canAcceptCommand()
function in each Menu Commands file that
is referenced in the menu to check whether the command is appropriate for the selection.
■
If the
canAcceptCommand()
function returns a
false
value, the menu item is
dimmed.
■
If the
canAcceptCommand()
function returns a
true
value or is not defined,
Dreamweaver calls the
isCommandChecked()
function to determine whether to
display a check mark next to the menu item. If the
isCommandChecked()
function is
not defined, no check mark appears.
3.
Dreamweaver calls the
setMenuText()
function to determine the text that should appear
in the menu.
If the
setMenuText()
function is not defined, Dreamweaver uses the text that is specified
in the
menuitem
tag.
4.
The user selects an item from the menu.