I have a Perspective View that contains a button with an “onActionPerformed” script attached to it. The script is a simple print statement, which I hoped would display in the Designer Output Console.
def runAction(self, event):
"""
This event is fired when the 'action' of the component occurs.
Arguments:
self: A reference to the component that is invoking this function.
event: An empty event object.
"""
print "Did this work?"
It did not. Or on the Gateway Log. Nope. It did add a text entry to the wrapper.log file on the server. If my script generates a Jython stack trace, however, I DO see that in the Output Console, so clearly Perspective can send at least some output to it.
I did find that I could create my own logger with system.util.getLogger and then use it to send things to the Gateway Log. That works, but am I missing something super easy here? And as a follow on question, is everything in Perspective Gateway scoped since there isn’t a “client” per se?