Adobe Extending Dreamweaver CS4 Uživatelský manuál Strana 194

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 387
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 193
188
EXTENDING DREAMWEAVER CS4
Toolbars
Returns
Dreamweaver expects a string that contains a menu ID, which is defined in the menus.xml file.
Example
function getMenuID()
{
var dom = dw.getDocumentDOM();
var menuID = '';
if (dom)
{
var view = dom.getView();
var focus = dw.getFocus();
if (view == 'design')
{
menuID = 'DWDesignOnlyOptionsPopup';
}
else if (view == 'split')
{
if (focus == 'textView')
{
menuID = 'DWSplitCodeOptionsPopup';
}
else
{
menuID = 'DWSplitDesignOptionsPopup';
}
}
else if (view == 'code')
{
menuID = 'DWCodeOnlyOptionsPopup';
}
else
{
menuID = 'DWBrowseOptionsPopup';
}
}
return menuID;
}
getUpdateFrequency()
Availability
Dreamweaver MX.
Description
Specifies how often to run the handlers for the enabled, checked, showIf, and value attributes to update the visible
state of the item.
You must specify the update frequency for toolbar items because they are always visible, unlike menus. For this reason,
you should always select the lowest frequency possible and make sure your
enabled, checked, and value handlers are
as simple as possible.
This function is equivalent to the update attribute in a toolbar item.
Zobrazit stránku 193
1 2 ... 189 190 191 192 193 194 195 196 197 198 199 ... 386 387

Komentáře k této Příručce

Žádné komentáře