org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-960AD4A0-AE70-4608-99E7-B663FB99A68D.html
changeset 229 716254ccbcc0
equal deleted inserted replaced
228:913c9751c067 229:716254ccbcc0
       
     1 
       
     2 <!DOCTYPE html
       
     3   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     4 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="copyright" content="(C) Copyright 2009"/><meta name="DC.rights.owner" content="(C) Copyright 2009"/><meta name="DC.Type" content="mobileconcept"/><meta name="DC.Title" content="Constructor"/><meta name="DC.Relation" scheme="URI" content="GUID-D498AD58-DF42-4FBA-8767-91FC624873C0"/><meta name="DC.Relation" scheme="URI" content="GUID-7C69DDA4-16F1-4A8F-BDB2-4CB0015B4E81"/><meta name="DC.Relation" scheme="URI" content="GUID-111DE423-9C84-4E4B-A45E-15081FE2A30D"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-960AD4A0-AE70-4608-99E7-B663FB99A68D"/><title>Constructor </title><script type="text/javascript">
       
     5       function initPage() {}
       
     6     </script><link href="../PRODUCT_PLUGIN/book.css" rel="stylesheet" type="text/css"/><link href="css/s60/style.css" rel="stylesheet" type="text/css" media="all"/></head><body onload="initPage();"><div class="body"><div class="contentLeft prTxt"><h1 class="pageHeading" id="GUID-960AD4A0-AE70-4608-99E7-B663FB99A68D">Constructor</h1><div>
       
     7 <p><strong>Description:</strong></p>
       
     8 <p>The <code>new</code> operator creates and instantiates an instance
       
     9 of the <a href="GUID-111DE423-9C84-4E4B-A45E-15081FE2A30D.html#GUID-111DE423-9C84-4E4B-A45E-15081FE2A30D"><code>MenuItem</code></a> object. </p>
       
    10 <p><strong>Syntax:</strong></p>
       
    11 <pre class="codeblock" id="GUID-80494264-F89D-4F89-B8D7-318AC6FAF590">[MenuItem] new MenuItem(String label, Integer id)</pre>
       
    12 <p><strong>Arguments:</strong></p>
       
    13 <ul>
       
    14 <li><p><code>label</code>:</p>
       
    15 
       
    16 <p>A text string that defines the label for the menu item.</p>
       
    17 
       
    18 </li>
       
    19 <li><p><code>id</code>:</p>
       
    20 
       
    21 <p>A unique integer that identifies the menu item.</p>
       
    22 
       
    23 </li>
       
    24 </ul>
       
    25 <p><strong>Return value:</strong></p>
       
    26 <p>An initialized instance of the <a href="GUID-111DE423-9C84-4E4B-A45E-15081FE2A30D.html#GUID-111DE423-9C84-4E4B-A45E-15081FE2A30D"><code>MenuItem</code></a> object.</p>
       
    27 <p><strong>Remarks:</strong></p>
       
    28 <p>If the arguments are not valid, a JavaScript exception indicating the
       
    29 error type is thrown. A valid argument implies an integer type for id and
       
    30 a string type for label. The string length for the label is truncated to 40
       
    31 characters if it exceeds that limit.</p>
       
    32 <p>Menu items on the whole menu tree are unique and identified by their <code>id</code>.</p>
       
    33 <p>For more general information on constructing an options menu, see <a href="GUID-94946735-D23B-49C6-BB65-8BE31737AE42.html#GUID-94946735-D23B-49C6-BB65-8BE31737AE42">Using softkeys</a>.</p>
       
    34 <p><strong>Example code:</strong></p>
       
    35 <p>See the example code in the description of the <a href="GUID-A022ED1B-E618-4C44-A437-78393900599C.html#GUID-A022ED1B-E618-4C44-A437-78393900599C"><code>MenuItem.onSelect</code></a> property.</p>
       
    36 </div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>