Adobe 38040334 - Dreamweaver CS3 User Manual page 184

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

enabled="script"
Optional. As with menus, the script returns a value that specifies whether the item is enabled. If you do not specify
this attribute, it defaults to enabled. The
toolbar command file.
Example
enabled="dw.getFocus() =='textView' || dw.getFocus() == 'html'"
checked="script"
This attribute is required for check buttons and radio buttons. Dreamweaver ignores the
types of items. As with menus, the script returns a value that specifies whether the item is checked or unchecked.
The
attribute is equivalent to
checked
attribute, it defaults to unchecked.
Example
checked="dw.getDocumentDOM() != null && dw.getDocumentDOM().getView() == 'code'"
value="script"
This attribute is required for pop-up menus, combo boxes, text boxes, and color pickers. Dreamweaver ignores the
attribute for other types of items.
value
To determine what value to display for pop-up menus and combo boxes, Dreamweaver first calls
for each item in the menu. If the
checked()
Dreamweaver displays the value for the first one. If no items return a
function is not defined, Dreamweaver calls the
attribute specifies. If the control is a combo box, Dreamweaver displays the returned value. If the control is a pop-up
menu, Dreamweaver temporarily adds the returned value to the list and displays it.
In all other cases, the script returns the current value to display. For pop-up menus or combo boxes, this value should
be one of the items in the menu list. For combo boxes and text boxes, the value can be any string that the script
returns. For color pickers, the value should be a valid color but Dreamweaver does not enforce this.
The value attribute is equivalent to the
update="update_frequency_list"
Optional. This attribute specifies how often the
update the visible state of the item. The
toolbar command file.
You must specify the update frequency for toolbar items because these items are always visible, unlike menu items.
For this reason, you should always select the lowest frequency possible and make sure your handlers for the
, and
handlers are as simple as possible.
checked
value
The following list shows the possible handlers for
not specify the
attribute, the update frequency defaults to
update
frequencies, separated by commas. The handlers run on any of the following specified events:
onServerModelChange
onCodeViewSyncChange
attribute is equivalent to the
enabled
isCommandChecked()
isCommandchecked()
getCurrentValue()
getCurrentValue()
enabled
attribute is equivalent to the
update
update_frequency_list
executes when the server model of the current page changes.
executes when the Code view becomes in or out of sync with the Design view.
canAcceptCommand()
in a toolbar command file. If you do not specify this
function returns a
value or the
true
function or executes the script that the
function in a toolbar command file.
,
,
, and
checked
showif
value
getUpdateFrequency()
, from least to most frequent. If you do
frequency. You can specify multiple update
onEdit
DREAMWEAVER CS3
Extending Dreamweaver
function in a
attribute for other
checked
isCommand-
value for any items,
true
isCommandChecked()
value
handlers should run to
function in a
enabled
178
,

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents