Closing A Modal Dialog; Palette Windows - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide

Closing a modal dialog

To close a modal dialog window, you must add one or more controls that can dismiss it. There are two
ways to dismiss a dialog:
Any control created with a name attribute of dialogok , dialogcancel , or dialogother closes the
dialog automatically when the user clicks that control. A control with any other name does not
automatically dismiss its dialog.
The
hide
method specifies the value that the
event handler that executes the hide function; see
Creating a Cancel button
A control of type button with name dialogcancel is a pushbutton that closes its dialog. This
example defines a
<jsxcontrol type="button" name="dialogcancel" value="Cancel"
</jsxcontrol>
Creating an OK button
GoLive recognizes a control of type button with name dialogok as a button that closes the dialog
when the user clicks it. Additionally, this button has a special outlined appearance that identifies it as the
default choice in the dialog—that is, its action is executed when the user presses the R
You can make any edit or button control behave this way by setting the control's enterOK property to
true . This example defines an
<jsxcontrol type="button" name="dialogok" value="OK"
</jsxcontrol>

Palette Windows

The Window menu contains a list of all palettes defined in loaded modules; they are hidden until selected.
Selected (visible) palettes are checked in the menu. GoLive defines some palettes, such as the Objects
palette and the Inspector, but your extension can define additional palettes.
The
< jsxpalette >
load an extension containing this tag, GoLive creates a
When it loads your extension, GoLive adds the palette window's title to the Window menu. For example,
the palette shown in this figure appears as the Script Palette item in the Window menu. A palette window
always exists while GoLive is running. When the user closes it, GoLive hides the palette from view, but does
not destroy the window object for the window.
method of the
window Object
button:
Cancel
posx="80" posy="138" width="60" height="18">
button whose enterOK property is automatically set to true :
OK
posx="80" posy="138" width="60" height="18">
tag creates a floating palette window that provides its own palette menu. When you
Adobe GoLive CS2 SDK
dismisses the dialog unconditionally. The argument to this
method returns when it exits. You can add a control with an
show
Providing Behavior for
window Object
Windows and Controls
Controls.
or E
ETURN
to represent it.
60
key.
NTER

Advertisement

Table of Contents
loading

Table of Contents