unexpected behaviour of 'display alert'

This works as it should when run as a script from the DTP Script Menu:```
display alert “DEVONthink” message “some message” as warning buttons {“Cancel”, “Redo”} cancel button 1 default button 2

It would be helpful to post the whole script (at least a version you’re comfortable sharing and that you know fails) so we can see the statement in context.

I’ve tried splitting this up from a one-liner to a snippet with the try block and it never fails to show the requested buttons.

tell application "DEVONthink Pro"
		"a" as real
	on error
		display alert "DEVONthink" message "some message" as warning buttons {"Cancel", "Redo"} cancel button 1 default button 2
	end try
end tell

Does this persist after a machine reboot?

The actual script uses libraries loaded into a script server, and puts up dialogs through Pashua. So posting it is a bit much.
It now seems to be a ‘scope’ problem. Looking into that.

If there’s a resolution that might be useful for others to know (i.e., relevant to DEVONthink) please check in again.

I have not been able to resolve this. I’m going to deal with it in the handler where the relevant error may occur.