MACROMEDIA DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER Specifications Page 211

  • Download
  • Add to my manuals
  • Print
  • Page
    / 504
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 210
The Menu Commands API 211
isCommandChecked()
Description
Determines whether to display a check mark next to the menu item.
Arguments
{arg1}, {arg2},...{argN}
If it is a dynamic menu item, the unique ID that the getDynamicContents() function
specifies is the only argument. Otherwise, if the
arguments attribute is defined for a
menuitem tag, the value of that attribute passes to the isCommandChecked() function
(and to the
canAcceptCommand(), receiveArguments(), and setMenuText()
functions) as one or more arguments. The arguments attribute is useful for distinguishing
between two menu items that call the same menu command.
Returns
Dreamweaver expects a Boolean value: true if a check mark should appear next to the menu
item;
false otherwise.
Example
function isCommandChecked()
{
var bChecked = false;
var cssStyle = arguments[0];
if (dw.getDocumentDOM() == null)
return false;
if (cssStyle == "(None)")
{
return dw.cssStylePalette.getSelectedStyle() == '';
}
else
{
return dw.cssStylePalette.getSelectedStyle() == cssStyle;
}
return bChecked;
}
NOTE
The arguments attribute is ignored for dynamic menu items.
Page view 210
1 2 ... 206 207 208 209 210 211 212 213 214 215 216 ... 503 504

Comments to this Manuals

No comments