Sorry about that, Kukurykus. I feel like an idiot because I actually had that in my code (in ESTK) but I messed up by not selecting it when I was copying-and-pasting everything into my post on here. But it was in there and it still wasn't working.
Here's my complete code since my original post but the callbacks just never work for some reason (the alert never shows anything, the console never prints anything, and the debugger never pauses the run):
Code: Select all
var bt = new BridgeTalk();
bt.target = 'estoolkit-4.0';
bt.body = function(){
app.clc();
}.toSource()+"()";
bt.onResult = function( responseMsgObject ) {
alert('test1');
$.writeln(responseMsgObject.body);
debugger;
};
bt.onError = function (btObj) {
alert('test2');
var errorCode = parseInt (btObj.headers ["Error-Code"]);
throw new Error (errorCode, btObj.body);
}
bt.send();
Examples would be a good thing to have for all of this. Diving into ExtendScript using the ESTK has been like pulling teeth for me. I'm not sure about you but I know that with my experiences, it never seems like you can depend on the Data Browser information. Granted, I just upgraded it to version 4.0 yesterday, so maybe things will be better but considering I'm trying to use it for developing against CS:3, I'm not holding my breath. And I'm with you about that guide... I mean, that thing helps but like you said, the examples are so sparse and limited that it leaves plenty of room for improvement.