mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-12-04 13:02:50 -05:00
new Window("palette") in a script with a named #targetengine shows a
palette that stays open beside the documents after the run ends.
show() runs onShow and returns at once; hide(), show() and close()
work as for a dialog, and close() and the close box run onClose.
Each click, change or close on a palette runs its handler as a run of
its own in the palette's engine, with its own report and undo step.
While another run goes on, the event waits and runs after it, oldest
first; a newer event for the same control or close replaces a waiting
one. An error in a handler ends that run and leaves the palette open.
A palette in a script without #targetengine, or with #targetengine
main, throws an Error that asks for a #targetengine line.
Palettes close when their engine is dropped or ends with an internal
error, and when the session ends. A session keeps at most 16 palettes
and 64 waiting events.
script.palettes lists the palettes and their controls, and
script.palette.event gives a palette a click, change or close. The
script checker lists palettes under dialogs instead of hostOnly.