I’m about to release two new versions of Dialog Toolkit, and I’m hoping for some feedback.
The first version, 2.0.3, is a simple update: it fixes one small bug, it works around a bug in the High Sierra betas that I fear will make it into the release version, and includes a bit of code tidying/refactoring.
The second version will actually be a separate library, called Dialog Toolkit Plus
, and will have several new features based on feedback I’ve received. It’s a separate library so that existing scripts don’t break, however it should be largely backwards compatible — so updating existing scripts should consist of no more than changing the use statement from Dialog Toolkit to Dialog Toolkit Plus.
There are two major changes in Dialog Toolkit Plus:
-
Many parameters are now optional. This will simplify code, and allows me to add new parameters without breaking existing scripts. The downside to this is that it means it cannot be used under macOS 10.9. (That’s why it’s a separate library.)
-
It introduces an extra command,
display enhanced window
, which can be used instead ofdisplay enhanced alert
. As the name implies, this lets you build a dialog that is not based on an alert. This means I can fulfil several requests people have made.
The enhanced window still works with the concept of an accessory view, however in this case there is no icon on the left, and no bold alert text and message above it. Instead the accessory view is full-width (allowing for margins at the sides and top), with a row of buttons underneath.
The first step to building an enhanced window is to create the buttons, using the create buttons
command. You pass a list of button names, and optionally designate which are the cancel and default buttons. You can also optionally provide a list of keyboard shortcuts to be assigned to the buttons. The command will return the list of button objects to pass to the display enhanced window
command, plus the minimum width of accessory view that will be required to match the space taken by the buttons.
You then build up the accessory view controls as before. The display enhanced window
command takes the same parameters as the alert (minus those for the main text, message and suppression checkbox), plus a parameter for the buttons, as well as optional parameters to set the initial active field, the initial position on screen, and whether the designated cancel button should be aligned left.
The other commands have also been modified, mostly by making various parameters optional. But there are some other changes too:
-
Labels have parameters for control size (ie, type size: regular, small and mini) and whether to use bold type.
-
The ‘max width for labels’ command also supports control size and bold type parameters.
-
Matrixes and popups, with or without labels, have a parameter for setting the item initially showing/checked.
There’s also a new max depth for label
command.
So I’m looking for:
-
People willing to test the new
Dialog Toolkit
with existing scripts. -
People willing to try
Dialog Toolkit Plus
. -
Feedback on any other feature requests. Speak soon, or forever hold your peace.
I’ll add links here in the next day or so.