Cross-product architecture
107
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 Macromedia, Inc. Client stubs generated by Macromedia
know about all methods and properties of every class accessible through RPC. These stubs are
available for download at the Macromedia website:
www.macromedia.com/go/
fw_documentation
.
Generating stubs for nonstandard client types
If the client is not written in one of the languages for which Macromedia provides a client
RPC library, the client implementer must create or generate the stubs. For information about
how to do this, see
Chapter 2, “The Fireworks Object Model,” on page 9
. The application
object (with object ID fw) is of the
Fireworks
class (for other objects with reserved IDs, see
“Object IDs” on page 103
). 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.
Chapter 2, “The Fireworks Object Model,” on page 9
documents dynamic properties and
specifies whether the dynamic properties are read only. Most dynamic properties are on lists
(for example, the
BehaviorsList
class). The properties take an integer or string as a property
name, and return a value based on the element associated with the property name.
5
Read-only property. The
set
request cannot be completed because the
specified property is read 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.
Error
code
Description
Summary of Contents for FIREWORKS 8-EXTENDING FIREWORKS
Page 1: ...Extending Fireworks ...
Page 4: ...4 Contents ...
Page 358: ...358 Fireworks JavaScript API ...
Page 372: ...372 Index ...