This content has been marked as final. Show 5 replies
Without seeing the code, it's very hard to know what might be wrong. If an error of any sort occurs in a ScriptUI handler, the handler just terminates so that life can go on.
When this happens to me, I insert alerts to let me see how far through the handler I got before the error.
Yes, Dave, I do this kind of debug all the time, writing either to console or showing alerts, but what good does it when you see that there IS a document but an alert shows that you fell into if(!app.activeDocument) ?
Try to attach to a button any function referring to a selection, for instance: returning width of the selected object. Try both types of window frame: 'dialog' and 'palette'. I'd be curious what results you'd get.
Unless I'm doing something wrong, I think there might be some problem with window layering.
instead of app.activeDocument try app.documents.
quoting myself: "referring to activeDocument as well as documents[x]"
Apparently this is a known issue:
and a palette causes the script to lose context, unlike a modal dialog.
But I somehow can't get even simplest BridgeTalk message to work...