org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-41FAD7DA-0DB7-48E7-BD60-58D6BFD785DA.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="IAppManager.LaunchDoc()"/><meta name="DC.Relation" scheme="URI" content="GUID-64CC3AB4-5444-474A-9470-818F423C5611"/><meta name="DC.Relation" scheme="URI" content="GUID-697AFF1F-24C7-43BD-A072-8352B3BE973C"/><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-2D651505-F68C-4053-B565-9FF826C5B897"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-41FAD7DA-0DB7-48E7-BD60-58D6BFD785DA"/><title>IAppManager.LaunchDoc() </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-41FAD7DA-0DB7-48E7-BD60-58D6BFD785DA"><span>IAppManager.</span>LaunchDoc()</h1><div>
       
     7 <p><strong>Description:</strong></p>
       
     8 <p>The <code>LaunchDoc</code> method launches an application based
       
     9 on a given document. This method automatically determines which application
       
    10 to launch for the specified document. </p>
       
    11 <p>The application can be launched as chained (embedded) or stand-alone.
       
    12 For more information about embedded and stand-alone applications, see section <a href="GUID-E092BF10-C076-4476-9E80-87919940201B.html#GUID-E092BF10-C076-4476-9E80-87919940201B">Accessing and launching installed applications</a>. </p>
       
    13 <p>This method can be called both synchronously and asynchronously.</p>
       
    14 <p><strong>Syntax:</strong></p>
       
    15 <p>For synchronous calls:</p>
       
    16 <pre class="codeblock" id="GUID-1AF88F9E-C308-4DCA-9695-BD8216288E16">result = so.IAppManager.LaunchDoc(criteria);</pre>
       
    17 
       
    18 <p>For asynchronous calls:</p>
       
    19 <pre class="codeblock" id="GUID-1D4D1F0D-8AEF-42A3-A3F8-ECF7F529F3A0">result = so.IAppManager.LaunchDoc(criteria, callback);</pre>
       
    20 
       
    21 <p><strong>Arguments:</strong></p>
       
    22 <ul>
       
    23 <li><p><code>criteria</code>:</p>
       
    24 
       
    25 <p>This is an object that specifies which application to launch. For more
       
    26 information about the object properties and how to define them, see section <a href="GUID-7B5D75D4-33A1-43A7-84EC-51CEB1CE8D51.html#GUID-7B5D75D4-33A1-43A7-84EC-51CEB1CE8D51">Criteria for launching an application</a>.</p>
       
    27 
       
    28 </li>
       
    29 <li><p><code>callback</code>:</p>
       
    30 
       
    31 <p>The <code>callback</code> argument is the name of the method
       
    32 that is executed when an asynchronous <code>LaunchDoc</code> call
       
    33 has status information to return. You must define this method separately.
       
    34 Follow the instructions in section <a href="GUID-C7C3B541-8D28-4DC6-9003-ECF57F26C608.html#GUID-C7C3B541-8D28-4DC6-9003-ECF57F26C608">Defining the callback handler for an asynchronous method</a> to
       
    35 define the <code>callback</code> method.</p>
       
    36 <p>This argument is used only with an asynchronous <code>LaunchDoc</code> call.</p>
       
    37 
       
    38 </li>
       
    39 </ul>
       
    40 <p><strong>Return value:</strong></p>
       
    41 <p/>
       
    42 <p>If synchronous, the <code>LaunchDoc</code> method returns an
       
    43 object that contains the name of the newly created document, if applicable,
       
    44 an error code, and an error message.</p>
       
    45 <div class="tablenoborder"><a name="GUID-77A79969-6A76-434C-B4DB-BCEC081D7818"><!----></a><table cellpadding="4" cellspacing="0" summary="" id="GUID-77A79969-6A76-434C-B4DB-BCEC081D7818" frame="border" border="1" rules="all"><caption><strong>Table: </strong>Return value
       
    46 properties for a synchronous LaunchDoc</caption>
       
    47 <thead align="left">
       
    48 <tr class="title "><th class="cellrowborder" valign="top" width="33.33333333333333%" id="d0e18965">
       
    49 <p>Property</p>
       
    50 </th><th class="cellrowborder" valign="top" width="33.33333333333333%" id="d0e18970">
       
    51 <p>Description</p>
       
    52 </th><th class="cellrowborder" valign="top" width="33.33333333333333%" id="d0e18975">
       
    53 <p>Value</p>
       
    54 </th></tr>
       
    55 </thead>
       
    56 <tbody>
       
    57 <tr class="">
       
    58 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e18965 ">
       
    59 <p><code>[result.ReturnValue]</code></p>
       
    60 </td>
       
    61 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e18970 ">
       
    62 <p>This is a string that contains the name of the newly created document,
       
    63 if any.</p>
       
    64 <p>This property is optional. A new document is created only when both
       
    65 of the following are true:</p>
       
    66 <ul>
       
    67 <li><p><code>criteria.MIMEType</code> is specified as <a href="GUID-7B5D75D4-33A1-43A7-84EC-51CEB1CE8D51.html#GUID-7B5D75D4-33A1-43A7-84EC-51CEB1CE8D51">input</a>.</p></li>
       
    68 <li><p>The launched application creates a new document. </p>
       
    69 </li>
       
    70 </ul>
       
    71 <p>A document name is never returned when <code>criteria.Document</code> is specified as <a href="GUID-7B5D75D4-33A1-43A7-84EC-51CEB1CE8D51.html#GUID-7B5D75D4-33A1-43A7-84EC-51CEB1CE8D51">input</a>.</p>
       
    72 </td>
       
    73 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e18975 ">&nbsp;</td>
       
    74 </tr>
       
    75 <tr class="bg ">
       
    76 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e18965 ">
       
    77 <p><code>result.ErrorCode</code></p>
       
    78 </td>
       
    79 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e18970 ">
       
    80 <p>This is a number that specifies a predefined error code.</p>
       
    81 </td>
       
    82 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e18975 ">
       
    83 <p>See <a href="GUID-0A215AF3-59F0-4158-842C-0D7B030E5EA4.html#GUID-0A215AF3-59F0-4158-842C-0D7B030E5EA4">Service API error codes</a>.</p>
       
    84 </td>
       
    85 </tr>
       
    86 <tr class="">
       
    87 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e18965 ">
       
    88 <p><code>result.ErrorMessage</code></p>
       
    89 </td>
       
    90 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e18970 ">
       
    91 <p>This is a text string that describes the error.</p>
       
    92 </td>
       
    93 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e18975 ">
       
    94 <p>See <a href="GUID-50795090-A429-41CF-8CAA-EA2004D2643A.html#GUID-50795090-A429-41CF-8CAA-EA2004D2643A">AppManager Service API error messages</a>.</p>
       
    95 </td>
       
    96 </tr>
       
    97 </tbody>
       
    98 </table></div>
       
    99 <p>If asynchronous, the <code>LaunchDoc</code> method returns an
       
   100 object that contains the initial return value for the asynchronous call it
       
   101 started (see the following table). The actual result information is returned
       
   102 by the <a href="GUID-C7C3B541-8D28-4DC6-9003-ECF57F26C608.html#GUID-C7C3B541-8D28-4DC6-9003-ECF57F26C608"><code>callback</code></a> method
       
   103 in the <code>ReturnValue</code> property of its result object. The
       
   104 returned information is described in the preceding table.</p>
       
   105 <div class="note"><p><strong class="note_title">Note: </strong>If <a href="GUID-64CC3AB4-5444-474A-9470-818F423C5611.html#GUID-64CC3AB4-5444-474A-9470-818F423C5611"><code>Cancel</code></a> is
       
   106 called on an ongoing asynchronous request, <code>LaunchDoc</code> does
       
   107 not return a notification when the launched application terminates.</p>
       
   108 </div>
       
   109 <div class="tablenoborder"><a name="GUID-6E7D70DD-D75A-41C0-9CC7-96448229FA08"><!----></a><table cellpadding="4" cellspacing="0" summary="" id="GUID-6E7D70DD-D75A-41C0-9CC7-96448229FA08" frame="border" border="1" rules="all"><caption><strong>Table: </strong>Return value
       
   110 properties for an asynchronous LaunchDoc</caption>
       
   111 <thead align="left">
       
   112 <tr class="title "><th class="cellrowborder" valign="top" width="33.33333333333333%" id="d0e19120">
       
   113 <p>Property</p>
       
   114 </th><th class="cellrowborder" valign="top" width="33.33333333333333%" id="d0e19125">
       
   115 <p>Description</p>
       
   116 </th><th class="cellrowborder" valign="top" width="33.33333333333333%" id="d0e19130">
       
   117 <p>Value</p>
       
   118 </th></tr>
       
   119 </thead>
       
   120 <tbody>
       
   121 <tr class="">
       
   122 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e19120 ">
       
   123 <p><code>result.TransactionID</code></p>
       
   124 </td>
       
   125 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e19125 ">
       
   126 <p>This is a number used as an identification to match transactions started
       
   127 with the asynchronous <code>LaunchDoc</code> call to one or more calls
       
   128 it generates to <code>callback</code>.</p>
       
   129 </td>
       
   130 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e19130 ">&nbsp;</td>
       
   131 </tr>
       
   132 <tr class="bg ">
       
   133 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e19120 ">
       
   134 <p><code>result.ErrorCode</code></p>
       
   135 </td>
       
   136 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e19125 ">
       
   137 <p>This is a number that specifies a predefined error code.</p>
       
   138 </td>
       
   139 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e19130 ">
       
   140 <p>See <a href="GUID-0A215AF3-59F0-4158-842C-0D7B030E5EA4.html#GUID-0A215AF3-59F0-4158-842C-0D7B030E5EA4">Service API error codes</a>.</p>
       
   141 </td>
       
   142 </tr>
       
   143 <tr class="">
       
   144 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e19120 ">
       
   145 <p><code>result.ErrorMessage</code></p>
       
   146 </td>
       
   147 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e19125 ">
       
   148 <p>This is a text string that describes the error.</p>
       
   149 </td>
       
   150 <td class="cellrowborder" valign="top" width="33.33333333333333%" headers="d0e19130 ">
       
   151 <p>See <a href="GUID-50795090-A429-41CF-8CAA-EA2004D2643A.html#GUID-50795090-A429-41CF-8CAA-EA2004D2643A">AppManager Service API error messages</a>.</p>
       
   152 </td>
       
   153 </tr>
       
   154 </tbody>
       
   155 </table></div>
       
   156 <p><strong>Example code:</strong></p>
       
   157 <p/>
       
   158 <p>For the complete source of a sample widget
       
   159 that demonstrates how to use this Service API, see <a href="GUID-2D47E7D9-199D-4D59-BD6A-592FA9F8B16A.html#GUID-2D47E7D9-199D-4D59-BD6A-592FA9F8B16A">the
       
   160 full example</a>.</p>
       
   161 
       
   162 
       
   163 
       
   164 
       
   165 </div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>