As an addendum, in the plugin I'm working on now, I have the following set up:
instanceProto.setError= function(errorString)
{
this.status.lastError = errorString;
this.runtime.trigger(cr.plugins_.MyPlugin.prototype.cnds.OnError, this);
}
instanceProto.fire = function(eventName)
{
if (cr.plugins_.MyPlugin.prototype.cnds[eventName])
{
this.runtime.trigger(cr.plugins_.MyPlugin.prototype.cnds[eventName], this);
}
else
{
this.setError("Condition " + eventName + " not found");
}
};
then I can set up an event that OnError prints out the error message. Of course, it may be better in other situations to log to the javascript console instead of (or in addition to) the above, but I found it handy, so I thought I'd pass on the tip.