New versions of Dialog Toolkit


(Shane Stanley) #41

This version fixes the shortcut bug:

See final link below

(Jonas Whale) #42


This version looks ok (to me).
At least for the DTplus version.

Do you want us to have a closed look on some particular function?

(Shane Stanley) #43

Not particularly. I think it’s about cooked…


Shane, can confirm the shortcut bug is fixed.

I still can’t figure out what’s going on with the labelled path control. Related to that, what does “with pops up” do ? I’ve testing with and without it and the dialog and the labeled path control look unchanged and behave in the same way both with mouse and keyboard.

Many thanks.

(Shane Stanley) #45

Neither can I until you email me a sample script showing the problem :grinning:

Can you send me a sample? Using pops up false should give a control that can only be changed by drag-and-drop.

(Shane Stanley) #46

Just to be clear: the two options are with pops up and without pops up.


Yes, have realised my error. Please see private message sent yesterday for example code I’m working, on Labelled Path Control.




I’m finally finished with the sushi chef book so I pay attention to the forum again.

I think I missed a lot of the testing stuff but I can write up some documentation like I did for “Dialog toolkit.” As I understand it no part of “Dialog Toolkit Plus” requires the main thread. That’s great :slight_smile: :slight_smile: :slight_smile: Requiring the main thread made it harder to tweak things in “Dialog Toolkit.”

What can I do to help? Is it still the case that nothing resembling an event loop can be implemented with “Dialog Toolkit Plus?” To me that is the biggest thing is to be able to process user input without closing the dialog.

Any way let me know how I can help.


(Shane Stanley) #49

Yes. That’s really a limitation of the single-threaded LIFO nature of AppleScript.


Shane, here is a simple bit of code which displays the labeled path control. I can’t figure out how make the label appear:

--  This sample shows a simple dialog to illustrate missing label in labeled path control
use AppleScript version "2.4"
use scripting additions
use script "Dialog Toolkit Plus" version "1.0"
set accViewWidth to 450
set accViewInset to 80
set Folder_Path to (path to desktop)
set diag_Title to "An example dialog"
set {theButtons, minWidth} to create buttons {"Cancel", "OK"} button keys {"", ""} default button 2 cancel button 1
if minWidth > accViewWidth then set accViewWidth to minWidth -- make sure buttons fit
set {thePathControl, pathLabel, theTop} to create labeled path control (POSIX path of Folder_Path) left inset accViewInset bottom 0 control width accViewWidth - 200 label text "Change folder here"
-- Display the window
set {button_returned, controls_results} to display enhanced window diag_Title acc view width accViewWidth acc view height theTop + 40 acc view controls {thePathControl} button list theButtons initial position {200, 200}

Here is a screen shot of the result:

Path Control


(Shane Stanley) #51

You have to pass the label as one of the controls to display enhanced window:

set {button_returned, controls_results} to display enhanced window diag_Title acc view width accViewWidth acc view height theTop + 40 acc view controls {thePathControl, pathLabel} button list theButtons initial position {200, 200}


Sorry, should’ve seen that. Many thanks.

(Shane Stanley) #53

So the release version is now available here:

Thanks for all the feedback!

(Shane Stanley) #54

I’ve just released a Dialog Toolkit Plus 1.0.1, which fixes a bug when setting the initially selected item in a matrix. The link above will take you to it.