How toolbar commands work
When Adobe Dreamweaver draws a toolbar, the following events occur:
- For each toolbar control item, Adobe Dreamweaver determines whether the
fileattribute exists. - If the
fileattribute exists, Adobe Dreamweaver calls thecanAcceptCommand()function to determine whether it should enable the control in the current context of the document.For the Document Title text box in the Adobe Dreamweaver toolbar, for example, the
canAcceptCommand()function checks to see if there is a current DOM and if the current document is an HTML file. If both these conditions are true, the function returnstrueand Adobe Dreamweaver enables the text box on the toolbar. - If the
fileattribute exists, Adobe Dreamweaver ignores the following attributes, if they are specified:checked,command,DOMRequired,enabled,script,showif,update, andvalue. - If the
fileattribute does not exist, Adobe Dreamweaver processes the attributes that are set for the toolbar control item:checked,command,DomRequired, and so on.For more information on specific item tag attributes, see Item tag attributes.
- Adobe Dreamweaver calls the
getCurrentValue()function on every update cycle, as specified by theupdateattribute, to determine what value to display for the control. - The user selects an item on the toolbar.
- Adobe Dreamweaver calls the
receiveArguments()function to process any arguments that theargumentsattribute of the toolbar item specifies.
For more information on the purpose of specific functions in the Toolbar Command API, see The toolbar command API.