macMikey / LCB-missing-manual

I'm trying to learn LCB, again, but the docs are thin.
MIT License
4 stars 4 forks source link

answer #10

Closed macMikey closed 2 years ago

macMikey commented 2 years ago

execute script? that seems to work, but is it the proper way?

bwmilby commented 2 years ago

See public handler OnClick() returns nothing in the TreeView widget source code. Here's the lines where it is actually used:

put "Really delete array element at path [" & the result & "]?" into tPrompt
execute script "answer \q" & tPrompt & "\q with \qOK\q and \qCancel\q; return it"
if the result is "OK" then
   removePath(tData["path"])
end if
macMikey commented 2 years ago

thanks!

macMikey commented 2 years ago

well, this fails execute script "answer \q" & "test" & "\q with \qOK\q and \qCancel\q; return it" with "Script access not allowed"

bwmilby commented 2 years ago

See my comment on issue #14

BerndN commented 2 years ago

execute script "answer \q" & "test" & "\q with \qOK\q and \qCancel\q; return it"

that works for me in a onMouseDown handler

I think "execute" is also not permitted within a onPaint handler (that includes the handler called during onPaint)

macMikey commented 2 years ago

Bernd has entered the chat! Yes, thank you, I see a note in the Dictionary about that, now.