The edit field read the focus of the field's outer response, which never
holds the keyboard focus: the focus sits on the field's text part. A
click elsewhere or Tab out of a palette's or dialog's edit field then did
not give the typed text to the script. The field now reads the text
part's focus loss (`text_lost_focus`).
The focus-loss test drives the focus with Tab through egui instead of
calling the commit helper, and fails without the fix.
The retry docs in the script.palette.event help, docs/mcp.md and the
progress-doc entry name the recoveryFolder and recoveryOffForComplex
preferences, the two recovery preferences whose change starts the
waiting events again.
OK returns a new object of the color given only when both the color and
its model are unchanged; a model-only change is a new pick. The progress
line, docs/mcp.md and the script.run params text now say so.
- paletteClose with another engine's palette id no longer drops that
palette's waiting events.
- A hidden palette is not described after a run or an add, so a
throwing getter on it no longer fails the run; script.palettes and
docs/mcp.md say a hidden palette lists its controls as they were.
- A check box's click rechecks the box after reading its value, so a
getter that disables it or closes the palette stops the click.
- A list's change rechecks that the list is still enabled and visible
after its item texts are read, and is dropped when a getter disabled
or hid it.
- A waiting palette event does not start its run, or ask for frames,
while the last run's print jobs wait for their answer.
- script.palette.event's help states that a change merges only after
its palette's last waiting click or close.
- update() takes a waiting palette event only when the run's file access
roots reach the same files as the event's, so a handler never runs with
less access than its palette was shown with.
- A palette event is no longer delivered to a handler after its palette
was hidden and shown again, or after a capturing listener disabled or
hid the control or a group above it.
- A limit that ends a handler update() took restores the run's own
actions before the end-of-run refresh.
- A palette refresh that fails reports no unhandled rejection.
- A refused palette field text no longer replaces text typed after it.
- The script.run, script.palette.event and docs texts describe update()
delivery, list staleness after item edits, and repeating a click or
close dropped with an oversized text.
The startup scripts run at launch no longer list the print service's
printers, so the first window does not wait on it; a script.startup.run
with any other reason still lists them. A script's print jobs that the
desktop's worker fails to send are shown in the status bar even when a
later line, a later batch that was sent or a startup script's failure
took it, and the startup script's notes stay in the hover.
script.startup.run's params text describes the print wait and the
launch rule.
A getter read after a button while the palette was described could
disable or hide the button, or a group above it, after the description
recorded it as enabled, and the click still ran its handler.
- Palette states are read without running a getter, once every
description getter (the default and cancel elements included) has
run, and a state that a getter gives counts as off. Dialogs keep
reading the states through their getters.
- Delivering a palette event reads the states of the control and the
groups above it again the same way, and checks that the palette still
holds the control, before the handler runs.
- docs/mcp.md, the progress line and script.palette.event's params text
describe the rule.
File.parent gives a folder in URI notation (/c/Users/..., with %20 for a
space). $.evalFile joined that text to the script's folder as written, so
on Windows $.evalFile(File($.fileName).parent + '/more.jsx') looked under
C:\c\Users\... and reported "include file not found".
When an absolute path starting with one / names no file the script may
read, $.evalFile now also tries it with its escapes decoded and, on
Windows, with /c/... as the drive C:. The path as written is still tried
first, and the scope check, the .. refusal and the file limits apply to
every form. Share and device paths are not converted, and #include lines
are read as before.
An answer given as an array or object, such as [1.00000001, 0, 0] or
{c: 100.000001, m: 0, y: 0, k: 0}, was narrowed to f32 before its range
check, so a component just past a limit rounded onto it and passed. Its
components are now checked as written, in f64 and on the scale
paint.setFill reads them in, as color keys already were. Boundary values
are still accepted.
docs/mcp.md and script.run's params text list "stop" as a colorPicker
answer, which a run stopped at the picker records.
- script.palette.event with nobody to ask answers with the report of the
run that handled the given event, also when it took the place of an
earlier waiting event or a run of its engine took it with update(); an
event dropped without a run is an error, and a later event that cannot
start leaves the given event's result. An open drag in a document other
than the active one is refused before the event waits, and the app's
palette start check uses the same rule.
- A palette event's handler and the refresh after a run take no waiting
event through update(), so a later event does not run inside them. The
refresh after a named run spends at most the unbroken-run allowance.
- A click whose button a getter removed during the event runs no handler.
- A window answer that could not reach the script lists the dialog with
the answer "error" instead of "stop".
- In a ScriptUI dialog, Escape, ui.dialog.cancel and a click keep the typed
texts when the run does not take the event, and a refused event asks for
the next frame so the queued events after it go on.
- Quitting while only palettes are open asks whether to stop the run.
A headless colorPicker answer written as a color key, such as
"rgb 300 0 0" or "rgb 255.000001 0 0", was clamped into range and
accepted, while the same color as an array or object was refused. The
key's components are now checked as written, in f64, before the key is
read. The near-white gray note in docs/mcp.md and colors.rs now says
which paint keeps its color when the read-back gray is assigned.
A waiting palette event merges with a newer one only when both have the
same file access scope, and a click or close merges only after its
palette's last waiting change. A text typed in a field keeps the scope
of each pass that edited it and goes to the script under what both that
scope and the committing pass allow; a click or close that commits it
takes those limits too. Passes recorded before the app takes them stay
separate. Scope coverage checks root containment instead of comparing
the same roots object, and the progress line describes when update()
runs a waiting event.
PathItem now takes PageItem's translate, rotate and resize: main's PathItem versions are removed, and resize on a path keeps main's changeLineWidths percent for the stroke weight. Hidden objects are refused, and an identity transform of an empty path checks its Transformation value and does nothing.
Document.saveAs without options picks the format from the name the
script gave, before a symbolic link is resolved, and a name without a
known extension keeps the document's format. A save that writes several
files refuses a destination that is a folder before it writes any of
them. imageCapture leaves out source paths outside the automation read
roots before it probes them. The host and scriptcheck name test lists
saveAs as a method, which it is now.
Document.rasterize, imageCapture, saveAs and exportFile send command
warnings to the Script Console, as app.open does. app.open no longer
inherits the linked-file permissions of documents open at the start of
the run. Rasterize by id refuses art on a locked artboard, and clip
bounds within floating-point error of whole pixels use that pixel count.
Capture sources leave out link paths the document cannot follow.
script.run's params text now says what app.undo() and app.redo() do. The artboardLayout messages,
their test and their catalog rows go back to main's text; they belong to file.new rather than to
script history.
- Adding a control or an item, and removing items, builds both arrays
before the first write, so a run that ends at the heap limit leaves the
lists and the dialog's counts as they were.
- A listener registered after an event started does not hear it in a later
phase, a capturing container's re-registration included.
- show() reads the dialog again when a getter changes a list item's text
after the item was read.
- Enter and Escape skip an OK or Cancel button inside a hidden or disabled
container.
- A resource string of a name and a type without braces throws a
SyntaxError, and a \u escape pair of surrogates reads as one character.
- In the app, queued events wait while another dialog is open over the
script's dialog, and the run's own questions wait while a popup, such as
an open drop-down list, is over it. ui.dialog.confirm and
ui.dialog.cancel take only the dialog, ui.dialog.set needs a field or an
action and answers with the dialog it set, and OK is refused while a
dialog open over it waits. A cancel after typed text clicks the cancel
button the dialog has when its turn comes, and an immediate cancel the
run refuses is an error.
- A click on a list box row gives the list the keyboard focus.
- The vc hint test names BridgeTalk, since Window now exists; the params
text and docs/mcp.md say that a show() in a handler notify runs throws
only in the app, and define_script_ui says when end is not called.
- app.showColorPicker opens on the script's color even when an earlier
picker left Only Web Colors on, and a changed RGB pick takes the model
of the run's own active document, which may be one the script made.
- Point reads and edits look a point up in a cached layout of where each
subpath's points start, so a loop over a path with many subpaths no
longer counts every subpath for each point. selectedPathPoints walks the
selected anchors of a partial selection instead of every point.
- PathPoint.selected writes the waiting point changes whenever any of
them added or removed points of the path.
- The path creators read the new path's id from the command's own result,
so an id above 2^53 stays exact.
- typename of a stale PathPoint or PathPoints throws as the other members
do.
- pageItems, pathItems and documents look up a key that reads as a number
but is not an index, such as "-1", by name first.
- artboardLayout keeps the columns the rows gave the current artboards
when a new layout replaces the rows without its own columns.
- Docs: pathItems.add() and the shape creators follow isolation; reading
another path's points does not write the waiting changes; a gray within
about 1e-14 % of white reads as 100; assigning documents throws in
strict mode; when showColorPicker keeps the given color's model.
script::folder::list and script::startup::list measured the 250 ms
listing limit (MAX_SCAN) with a real Instant. script.listInstalled,
script.startup.run and the File > Scripts menu read the folders through
them, so a test that went through any of these got a truncated listing
and missing scripts whenever the disk stalled for 250 ms.
- folder::Clock is either Wall (the real time since the listing started,
the default) or Fixed (the same time at every check). Both list
functions take one.
- Session::set_script_listing_clock sets the clock the two commands and
the menu's listing job use; the app keeps the real clock.
- The script folder, startup script, scripts menu, script run and Safe
Mode tests list with a fixed zero time, so a slow disk cannot cut a
listing short. Direct listing calls use the test file's list helper.
- New tests check that script.listInstalled, script.startup.run and the
menu stop at the session's clock once it is past the limit and list
everything at the limit.