Hello,
My test script is as follows:
use scripting additions
use script "Dialog Toolkit Plus"
try
try
set {LabelField, LabelID, LabeltoTop} to ¬
create top labeled field ¬
¬
"" placeholder text ¬
"Type some text..." bottom 5 ¬
left inset 30 ¬
field width 200 ¬
label text ¬
"Text value" extra height 1
set {popupList, PopupToTop} to ¬
create popup {"Choose Me", "No Me", "Better ME!"} ¬
bottom LabeltoTop + 25 ¬
left inset 30 ¬
popup width 60
on error
return "Popup and labeled fields are invalid."
end try
set {ButtonPressed, IsSuppr, _Values} to ¬
display enhanced alert ¬
"This is Alert!" suppression false ¬
message ¬
"The last action failed." buttons {"Cancel", "Really?", "OK"} ¬
acc view width 350 ¬
acc view height 400 ¬
acc view controls {LabelField, LabelID, LabeltoTop, ¬
popupList, PopupToTop}
on error errMsg number errNum
return "Enhanced alert completed with an error." & return & return & "Error " & errNum & "," & return & "Error says: " & errMsg
end try
I enclosed it in error traps. Running it I always get the second error alert complemented by the app event error
Error: the AppleEvent was not handled by any handler (errAEEventNotHandled:-1708).
that in the AppleScript version appears as
"Enhanced alert completed with an error.
Error -1708,
Error says: {«class ocid» id «data optr000000008090EA0000600000», 104.0} doesn’t understand the “suppressionButton” message."
Why? I draw on the sample script just with some commands omitted. I created a control I handed over to the display enhanced alert command. All conditions have been met. Why do I still get this error?