Adobe Extending Dreamweaver CS4 Instrukcja Użytkownika Strona 169

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 387
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 168
163
EXTENDING DREAMWEAVER CS4
Menus and menu commands
Arguments
menuID
The menuIDargument is the value of the id attribute in the menuitem tag that is associated with the item.
Returns
Dreamweaver expects an array of strings where each string contains the name of a menu item and its unique ID,
separated by a semicolon. If the function returns a
null value, the menu does not change.
Example
The following example of the getDynamicContent() function returns an array of four menu items (My Menu Item
1, My Menu Item 2, My Menu Item 3, and My Menu Item 4):
function getDynamicContent(){
var stringArray= new Array();
var i=0;
var numItems = 4;
for (i=0; i<numItems;i++)
stringArray[i] = new String("My Menu Item " + i + ";¬
id='My-MenuItem" + i + "'");
return stringArray;
}
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()” on page 162, receiveArguments()” on page 164,
and setMenuText()” on page 165 functions) as one or more arguments. The arguments attribute is useful for
distinguishing between two menu items that call the same menu command.
Note: The arguments attribute is ignored for dynamic menu items.
Returns
Dreamweaver expects a Boolean value: true if a check mark should appear next to the menu item; false otherwise.
Przeglądanie stron 168
1 2 ... 164 165 166 167 168 169 170 171 172 173 174 ... 386 387

Komentarze do niniejszej Instrukcji

Brak uwag