Multiple Inspectors; Supporting The Undo And Redo Commands; Undo Support And Document Parsing - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide
urlgetter.addEventListener( 'onChange', urlChanged);
}
This example only considers the controls in the custom element's Inspector. However, in a real extension,
your handler's switch statement must provide a case expression for every control to which the
extension must respond, including those in other windows.

Multiple Inspectors

You can define multiple inspectors and specify which to use for the box object. To create more than one
inspector, define additional inspectors with different classid values,:
<jsxinspector name="insp1" title="one" classid="myclass">
...
</jsxinspector>
<jsxinspector name="insp2" title="two" classid="alternate">
...
</jsxinspector>
At runtime, specify the Inspector that a box should use by setting its classid property. For example, this
specifies that the myBox object should use the Inspector created from the <jsxinspector classid=
"alternate" ... > element:
var myBox = boxes[myboxname];
myBox.classid = "alternate";

Supporting the Undo and Redo Commands

GoLive provides built-in undo support for dropping and resizing the boxes that represent custom
elements in Layout view. The user can undo or redo such operations by choosing the
from the
support yourself.
The steps required to implement undo support for a single task are:
Creating the undo object
Initializing the undo object
Implementing the undoSignal Function

Undo support and document parsing

You can add undo support for any operation that does not cause GoLive to reparse. To undo an operation,
you use a saved value, such as a name, to retrieve a previously changed markup object. Reparsing the
document discards the entire markup tree, making the markup object required by the undo object
unavailable. Thus, when Layout view is open:
Operations on many SDK-defined elements can be undone completely, because they do not cause
reparsing. For a complete list of elements that can be changed without reparsing, see
"Managed Layout Tags
Most operations involving non-SDK elements cannot be undone, because they do cause reparsing.
(Note that even if your particular extension does not cause Layout view to reparse the document, the
user or another extension may cause a reparse.)
menu. For other operations involving your custom element, you must implement undo
Edit
in the GoLive CS2 SDK Programmer's Reference.
Adobe GoLive CS2 SDK
Custom Elements
88
or
item
Undo
Redo
Appendix C,

Advertisement

Table of Contents
loading

Table of Contents