This version fixes the shortcut bug:
See final link below
This version fixes the shortcut bug:
See final link below
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?
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.
Neither can I until you email me a sample script showing the problem
Can you send me a sample? Using pops up false
should give a control that can only be changed by drag-and-drop.
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.
Thanks.
Shane,
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 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.
Bill
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:
Thanks.
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.
So the release version is now available here:
https://www.macosxautomation.com/applescript/apps/Script_Libs.html#DialogToolkit
Thanks for all the feedback!
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.
I’m just about to release version 1.1.0 of Dialog Toolkit Plus. It’s mainly a large refactoring to deal with threading issues that have become more important with Mojave, but there are also a couple of other changes, including a new secure field for stuff like password entry. It also addresses an issue with cancel/default buttons that may reverse them in some scripts, unfortunately.
Version 1.1.0 is now out, available here:
https://www.macosxautomation.com/applescript/apps/Script_Libs.html
Coming back to this, the last few messages in this thread:
offer a potential solution by combining Myriad Tables with Dialog Toolkit Plus, so the former provides the table and code from the latter provides the other controls.
That’s really great Shane!
Thanks for your great Libs, and for remembering my question.
FWIW, I did spend a bit of time trying to include a list view in Display Dialog Plus, but doing it in code alone proved even harder than I thought. I think the combo provides a better solution, though, because there are far fewer restrictions on table type.
Shane, I’ve encountered a weird problem.
My app has a dialog created with the Dialog Toolkit Plus. I have an automator service which runs in web browsers. Running the service switches from the browser to my app (by making my app frontmost).
It works fine normally. But, if the browser is in full screen, my app’s dialog “blinks”.
I don’t know how to describe it better but it’s as if the dialog is being displayed twice quickly – but only if the switch is from a browser (or any application) in full screen mode. I get the same if I manually switch from an app in full screen to my app (ie. using command-tab).
This also seems to affect GUI scripting code in the service (which pastes text into my app’s dialog) – it doesn’t run after my app is made front most.
This is happening in macOS 10.13 and 10.14 (I can’t test any earlier OSs).
Could there be something in my implementation of Dialog Toolkit Plus v1.1.0 that’s the cause ?