org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-E138B464-2086-4E74-B356-ACF8687BBB5A.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="IDataSource.New()"/><meta name="DC.Relation" scheme="URI" content="GUID-55591BBC-49F8-407D-98F5-1D2FCD5DFB34"/><meta name="DC.Relation" scheme="URI" content="GUID-7C69DDA4-16F1-4A8F-BDB2-4CB0015B4E81"/><meta name="DC.Relation" scheme="URI" content="GUID-65AAF569-D347-462B-B59A-9D7CA184AB9C"/><meta name="DC.Relation" scheme="URI" content="GUID-B8845FF1-D7F6-476A-8651-8B9C12D8789F"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-E138B464-2086-4E74-B356-ACF8687BBB5A"/><title>IDataSource.New() </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-E138B464-2086-4E74-B356-ACF8687BBB5A"><span>IDataSource.</span>New()</h1><div>
       
     7 <p><strong>Description:</strong></p>
       
     8 <p>The <code>New</code> method creates an empty landmark or landmark
       
     9 category item. You can use the new item as a template.</p>
       
    10 <p>This is a synchronous method.</p>
       
    11 <p><strong>Syntax:</strong></p>
       
    12 
       
    13 <pre class="codeblock" id="GUID-B78E6EE2-F0FC-4684-A621-605105566E8E">result = so.IDataSource.New(criteria);</pre>
       
    14 <p><strong>Arguments:</strong></p>
       
    15 <ul>
       
    16 <li><p><code>criteria</code>:</p>
       
    17 
       
    18 <p>This is an object that specifies the type of item to create. The following
       
    19 table describes the properties of this object.</p>
       
    20 
       
    21 </li>
       
    22 </ul>
       
    23 <div class="tablenoborder"><a name="GUID-AC0790B4-4777-45B4-9ECE-33B75677F998"><!----></a><table cellpadding="4" cellspacing="0" summary="" id="GUID-AC0790B4-4777-45B4-9ECE-33B75677F998" frame="border" border="1" rules="all"><caption><strong>Table: </strong><span>Criteria</span> object properties</caption>
       
    24 <thead align="left">
       
    25 <tr class="title "><th class="cellrowborder" valign="top" width="33.33333333333333%" id="d0e38963">
       
    26 <p>Property</p>
       
    27 </th><th class="cellrowborder" valign="top" width="33.33333333333333%" id="d0e38968">
       
    28 <p>Description</p>
       
    29 </th><th class="cellrowborder" valign="top" width="33.33333333333333%" id="d0e38973">
       
    30 <p>Value</p>
       
    31 </th></tr>
       
    32 </thead>
       
    33 <tbody>
       
    34 <tr class="">
       
    35 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e38963 ">
       
    36 <p><code>criteria.Type</code></p>
       
    37 </td>
       
    38 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e38968 ">
       
    39 <p>This is a text string that specifies the type of item to create.</p>
       
    40 </td>
       
    41 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e38973 ">
       
    42 <p>Possible values:</p>
       
    43 <ul>
       
    44 <li><p><code>"Landmark"</code></p></li>
       
    45 <li><p><code>"Category"</code></p></li>
       
    46 </ul>
       
    47 </td>
       
    48 </tr>
       
    49 </tbody>
       
    50 </table></div>
       
    51 <p><strong>Return value:</strong></p>
       
    52 <p>The <code>New</code> method returns an object that contains
       
    53 the empty item that it created, an error code, and an error message.</p>
       
    54 <div class="tablenoborder"><a name="GUID-8B0F000A-3396-486E-927B-A826983B85CE"><!----></a><table cellpadding="4" cellspacing="0" summary="" id="GUID-8B0F000A-3396-486E-927B-A826983B85CE" frame="border" border="1" rules="all"><caption><strong>Table: </strong>Return value
       
    55 properties for New</caption>
       
    56 <thead align="left">
       
    57 <tr class="title "><th class="cellrowborder" valign="top" width="33.33333333333333%" id="d0e39042">
       
    58 <p>Property</p>
       
    59 </th><th class="cellrowborder" valign="top" width="33.33333333333333%" id="d0e39047">
       
    60 <p>Description</p>
       
    61 </th><th class="cellrowborder" valign="top" width="33.33333333333333%" id="d0e39052">
       
    62 <p>Value</p>
       
    63 </th></tr>
       
    64 </thead>
       
    65 <tbody>
       
    66 <tr class="">
       
    67 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e39042 ">
       
    68 <p><code>result.ReturnValue</code></p>
       
    69 </td>
       
    70 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e39047 ">
       
    71 <p>This is an object that contains the empty landmark or landmark category
       
    72 item.</p>
       
    73 </td>
       
    74 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e39052 ">
       
    75 <p>See <a href="GUID-2B3FD0AF-2552-46AB-83B5-F404506D16EE.html#GUID-2B3FD0AF-2552-46AB-83B5-F404506D16EE">Landmark</a> or <a href="GUID-40EAD781-6B30-406E-B05F-0BE932EFE86A.html#GUID-40EAD781-6B30-406E-B05F-0BE932EFE86A">Landmark category</a>, depending on which
       
    76 type of item was created.</p>
       
    77 </td>
       
    78 </tr>
       
    79 <tr class="bg ">
       
    80 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e39042 ">
       
    81 <p><code>result.ErrorCode</code></p>
       
    82 </td>
       
    83 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e39047 ">
       
    84 <p>This is a number that specifies a predefined error code.</p>
       
    85 </td>
       
    86 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e39052 ">
       
    87 <p>See <a href="GUID-0A215AF3-59F0-4158-842C-0D7B030E5EA4.html#GUID-0A215AF3-59F0-4158-842C-0D7B030E5EA4">Service API error codes</a>.</p>
       
    88 </td>
       
    89 </tr>
       
    90 <tr class="">
       
    91 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e39042 ">
       
    92 <p><code>result.ErrorMessage</code></p>
       
    93 </td>
       
    94 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e39047 ">
       
    95 <p>This is a text string that describes the error.</p>
       
    96 </td>
       
    97 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e39052 ">
       
    98 <p>See <a href="GUID-4ECCCBED-DE6D-4366-B037-90E874C4DF5C.html#GUID-4ECCCBED-DE6D-4366-B037-90E874C4DF5C">Landmarks Service API error messages</a>.</p>
       
    99 </td>
       
   100 </tr>
       
   101 </tbody>
       
   102 </table></div>
       
   103 <p><strong>Example code:</strong></p>
       
   104 <p/>
       
   105 <p>For the complete source of a sample widget
       
   106 that demonstrates how to use this Service API, see <a href="GUID-11D59F76-EC4C-4297-B262-D5174E826B43.html#GUID-11D59F76-EC4C-4297-B262-D5174E826B43">the
       
   107 full example</a>.</p>
       
   108 
       
   109 
       
   110 </div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>