Adobe 38039927 - Fireworks CS3 - PC Extended User Manual page 266

Extending fireworks
Hide thumbs Also See for 38039927 - Fireworks CS3 - PC:
Table of Contents

Advertisement

<return error="5" />
The
attribute can contain one of the values listed in the following table.
error
Error code
Description
0
No error occurred, and the request completed successfully. The client should never receive an error
attribute with this value. If no error occurred, then no error attribute will be present.
1
An unknown, generic error occurred. The RPC server could not make enough sense of the request
to give a specific error. Check the name of the XML nodes and attributes.
2
No such object, invalid object ID. The object specified by the client does not exist or the object ID
is invalid.
3
No such method. The method that the client requested does not exist on the specified object.
4
No such property. The property that the client requested does not exist on the specified object.
5
Read-only property. The
only.
6
Wrong number of parameters. The request did not specify the correct number of parameters. Either
more or fewer parameters are needed.
7
Wrong parameter type. One or more of the parameters given is of the wrong type.
8
Security violation. The method is not allowed in RPC.
RPC and the Fireworks JavaScript DOM
The RPC server does not allow for self-discovery of the server classes and their methods. Instead the client must
know the methods and properties of a given class of objects beforehand. If the client is written in ActionScript or
C++, then the client can use the generated client stubs provided by Adobe. Client stubs generated by Adobe know
about all methods and properties of every class accessible through RPC. These stubs are available for download at
the Adobe website: www.adobe.com/go/fireworks_documentation.
Generating stubs for nonstandard client types
If the client is not written in one of the languages for which Adobe provides a client RPC library, the client imple-
menter must create or generate the stubs. For information about how to do this, see "The Fireworks Object Model"
on page 4. The application object (with object ID fw) is of the
see "Object IDs" on page 259). All objects returned by the server contain the class name as an attribute. Given an
object's class, the client can determine what methods and properties it has based on the Fireworks JavaScript DOM.
The DOM document also gives the prototypes of the methods and properties of a class. The client can use the DOM
document to determine the number and types of method parameters. The DOM document uses more types in its
prototypes than the RPC mechanism defines. So, several of the documented types collapse to one RPC type.
In addition to static properties, objects of certain classes can also have dynamic properties. "The Fireworks Object
Model" on page 4 documents dynamic properties and specifies whether the dynamic properties are read only. Most
dynamic properties are on lists (for example, the
a property name, and return a value based on the element associated with the property name.
The following table shows the mapping between the Fireworks Object Model data types and the RPC data types.
set
request cannot be completed because the specified property is read
BehaviorsList
class (for other objects with reserved IDs,
Fireworks
class). The properties take an integer or string as
ADOBE FIREWORKS CS3
262
Extending Guide

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fireworks cs3

Table of Contents