Description:
The LaunchDoc
method launches an application based
on a given document. This method automatically determines which application
to launch for the specified document.
The application can be launched as chained (embedded) or standalone. For more information about embedded and standalone applications, see section Accessing and launching installed applications.
This method can be called both synchronously and asynchronously.
Syntax:
For synchronous calls:
result = so.IAppManager.LaunchDoc(criteria);
For asynchronous calls:
result = so.IAppManager.LaunchDoc(criteria, callback);
Arguments:
criteria
:
This is an object that specifies which application to launch. For more information about the object properties and how to define them, see section Criteria for launching an application.
callback
:
The callback
argument is the name of the method
that is executed when an asynchronous LaunchDoc
call
has status information to return. You must define this method separately.
Follow the instructions in section Defining the callback handler for an asynchronous method to
define the callback
method.
This argument is used only with an asynchronous LaunchDoc
call.
Return value:
If synchronous, the LaunchDoc
method returns an
object that contains the name of the newly created document, if applicable,
an error code, and an error message.
Property |
Description |
Value |
---|---|---|
|
This is a string that contains the name of the newly created document, if any. This property is optional. A new document is created only when both of the following are true:
A document name is never returned when |
|
|
This is a number that specifies a predefined error code. |
|
|
This is a text string that describes the error. |
If asynchronous, the LaunchDoc
method returns an
object that contains the initial return value for the asynchronous call it
started (see the following table). The actual result information is returned
by the callback
method
in the ReturnValue
property of its result object. The
returned information is described in the preceding table.
Note: If Cancel
is
called on an ongoing asynchronous request, LaunchDoc
does
not return a notification when the launched application terminates.
Property |
Description |
Value |
---|---|---|
|
This is a number used as an identification to match transactions started
with the asynchronous |
|
|
This is a number that specifies a predefined error code. |
|
|
This is a text string that describes the error. |
Example code:
For the complete source of a sample widget that demonstrates how to use this Service API, see the full example.