diff -r 4d198a32ac7d -r d4809db37847 plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-960AD4A0-AE70-4608-99E7-B663FB99A68D.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/plugins/org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-960AD4A0-AE70-4608-99E7-B663FB99A68D.html Thu Aug 19 17:48:04 2010 -0700 @@ -0,0 +1,36 @@ + + +
Description:
+The new
operator creates and instantiates an instance
+of the MenuItem
object.
Syntax:
+[MenuItem] new MenuItem(String label, Integer id)+
Arguments:
+label
:
A text string that defines the label for the menu item.
+ +id
:
A unique integer that identifies the menu item.
+ +Return value:
+An initialized instance of the MenuItem
object.
Remarks:
+If the arguments are not valid, a JavaScript exception indicating the +error type is thrown. A valid argument implies an integer type for id and +a string type for label. The string length for the label is truncated to 40 +characters if it exceeds that limit.
+Menu items on the whole menu tree are unique and identified by their id
.
For more general information on constructing an options menu, see Using softkeys.
+Example code:
+See the example code in the description of the MenuItem.onSelect
property.