Open sooslaca opened 6 years ago
Hey, there was this pull request https://github.com/gen2brain/dlgs/pull/3 , so not sure what is the correct fix here @leonjza .
Hmm, problem with not "telling" a specific application is that when you are not in a logged in user context, there will be no dialog at all.
@sooslaca why do you think it is because of "with icon" part, it works ok without it? I don't use macOS so I don't really understand that well all those telling, there was this issue with color selector https://github.com/gen2brain/dlgs/issues/1 where app was hanging until you "tell".
hey, I'm not a MAC guru either, but here is the proof from Terminal app:
WITH ICON:
MACMACHINE:~ user$ osascript -e 'tell app "System Events" to display dialog "A stop dialog with only one button." buttons "OK" default button 1 with title "and a title" with icon stop'
28:150: execution error: System Events got an error: Can’t make application "System Events" into type number or string. (-1700)
(dialog is NOT displayed)
WITHOUT ICON:
MACMACHINE:~ user$ osascript -e 'tell app "System Events" to display dialog "A stop dialog with only one button." buttons "OK" default button 1 with title "and a title"'
button returned:OK
(after this dialog displays)
OS VERSION:
MACMACHINE:~ user$ uname -a
Darwin MACMACHINE 17.7.0 Darwin Kernel Version 17.7.0: Thu Jun 21 22:53:14 PDT 2018; root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
Also works in terminal if I leave out 'tell app "System Events"
MACMACHINE:~ user$ osascript -e 'display dialog "A stop dialog with only one button." buttons "OK" default button 1 with title "and a title" with icon stop'
button returned:OK
Sorry, dunno how to open a pull request.
message_darwin.go line 61:
Change From: tell application "System Events" to display dialog .... To: display dialog ...
Otherwise you get (because of "with icon" part): 28:115: execution error: System Events got an error: Can’t make application "System Events" into type number or string. (-1700)
https://docwhat.org/mac-shell-dialogs