MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Spezifikationen Seite 239

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 504
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 238
The toolbar command API 239
canAcceptCommand()
Availability
Dreamweaver MX.
Description
Determines whether the toolbar item is enabled. The enabled state is the default condition for
an item, so you should not define this function unless it returns a
false value in at least one
case.
Arguments
For pop-up menus, combo boxes, text boxes, and color pickers, the first argument is the
current value within the control. The
getDynamicContent() function can optionally attach
individual IDs to items within a pop-up menu. If the selected item in the pop-up menu has
an ID attached, Dreamweaver passes that ID to
canAcceptCommand() instead of the value.
For combo boxes, if the current contents of the text box do not match an entry in the pop-up
menu, Dreamweaver passes the contents of the text box. Dreamweaver compares against the
pop-up menu without case-sensitivity to determine whether the contents of the text box
match an entry in the list.
If you specify the
arguments attribute for this toolbar item in the toolbars.xml file, those
arguments are passed next. If you did not specify the
arguments attribute, Dreamweaver
passes the ID of the item.
Returns
Dreamweaver expects a Boolean value; true if the item is enabled; false otherwise.
Example
function canAcceptCommand()
{
return (dw.getDocumentDOM() != null);
}
Seitenansicht 238
1 2 ... 234 235 236 237 238 239 240 241 242 243 244 ... 503 504

Kommentare zu diesen Handbüchern

Keine Kommentare