Class SnpSendCustomObject
Object
|
+--SnpSendCustomObject
- class
SnpSendCustomObject
Shows how to pass a custom JavaScript object from Adobe Bridge CS5 to another
application (Adobe Photoshop CS5) in a BridgeTalk message, and pass it back in a response.
Usage
- Make sure Adobe Bridge CS5 and Adobe Photoshop CS5 are running
- Run the snippet in the ExtendScript Toolkit (ESTK),
with Bridge as the target (see Readme.txt)
- Inspect the JavaScript Console in the ESTK for information on the sequence of messages and
objects passed.
- Note; there is no other visible output besides the trace to the JavaScript Console of the ESTK.
Description
Bridge sends a BridgeTalk message to Photoshop, passing a
JavaScript object. Photoshop reconstructs and modifies the object,
then serializes the object and returns it as the result of the initial message.
In processing the result, Bridge evaluates the serialized object in order
to reconstruct it.
Defined in SnpSendCustomObject.jsx
Field Summary |
String |
requiredContext
The context in which this snippet can run. |
Method Summary |
Boolean
|
canRun()
Determines whether snippet can run given current context.
|
Boolean
|
run()
Functional part of this snippet.
|
requiredContext
String requiredContext
The context in which this snippet can run.
SnpSendCustomObject
SnpSendCustomObject()
canRun
Boolean canRun()
Determines whether snippet can run given current context. The snippet
fails if these preconditions are not met:
- Must run in Bridge
- Photoshop must be running
Returns:
True if this snippet can run, false otherwise
run
Boolean run()
Functional part of this snippet.
Constructs a BridgeTalk message, which contains both the script to
run in Photoshop, and the onResult callback for processing the response,
then sends the message to Photoshop.
The script contains a serialized JavaScript object, reconstructs and
modifies it on the target side, then reserializes and sends it back
as the result.
The sender reconstructs the serialized object it receives as the result
of the message.
Returns:
True if the snippet ran as expected, false if Photoshop or Bridge is not running, or if an error occurred sending the message.
http://www.adobe.com/devnet/bridge
Documentation generated by
JSDoc on Tue Apr 27 10:21:34 2010