I’m having an issue with the display enhanced alert command in Dialog ToolkitPlus.
When I run the script below I get an error message:
-- --{«class ocid» id «data optr000000008007E42101000000», 30, 113.0} doesn’t understand the “suppressionButton” message.
Also, the partial result doesn’t seem to match what the actual result should be.
-- --{<NSButton: 0x121e708a0>, 30, 113.0}
Further, if pass an empty accViewControls to the command, I get a similar error, but four items in the partial result.
--{{«class ocid» id «data optr00000000F057ED2101000000», «class ocid» id «data optr00000000A07F0E4201000000», «class ocid» id «data optr0000000000D7214201000000»}, 243} doesn’t understand the “suppressionButton” message.
The errors seems to have something to do with the suppression button, but I get the same error if suppression is true/false or omitted.
If I use the Display Enhanced Window command instead, it works like a charm.
(This is in addition to the clipping error I reported yesterday and am still having issues with, which seems to be resolved).
use script "Dialog Toolkit Plus"
use scripting additions
set accViewControls to {}
set controlResults to {}
set accViewWidth to 400
set accViewHeight to 200
set theBottom to 0
set spacer to 12
set theBottom to spacer
--Variables
set alertText to "text"
set initialPosition to {30, 30}
--Build alert buttons
set buttonList to {("Cancel"), ("Copy"), ("Okay")}
set {theButtons, theWidth} to create buttons buttonList ¬
default button 3 ¬
cancel button 1 ¬
equal widths false ¬
--button keys {textList}
if theWidth > accViewWidth then set accViewWidth to theWidth
-->ACC views go here
-->>CheckBox
set checkBoxTitle to "Checkbox text"
set {theCheckBoxValue, theTop, theWidth} to ¬
create checkbox checkBoxTitle ¬
left inset 0 ¬
bottom theBottom ¬
max width accViewWidth ¬
without initial state
set theBottom to (theTop + spacer)
set the end of accViewControls to theCheckBoxValue
--<<CheckBox
--<<
--Display enhanced alert
set {userResponse, suppression, controlValues} to ¬
display enhanced alert alertText ¬
message alertText ¬
as informational alert ¬
buttons theButtons ¬
suppression false ¬
acc view width accViewWidth ¬
acc view height accViewWidth ¬
acc view controls accViewControls ¬
giving up after 60
-- error message
-- --{«class ocid» id «data optr000000008007E42101000000», 30, 113.0} doesn’t understand the “suppressionButton” message.
-- error values
-- --{<NSButton: 0x121e708a0>, 30, 113.0}
→ Mac OS Version 11.6.8 (20G730)
→ Script Debugger 8.0.5 (8A61)
→ Dialog Toolkit Plus 1.1.2