what do i have to do to call functions of my main application class from wtkx event handlers? say loadData() is a public function of my application class (the one which reads and binds the wtkx), the following doesn't work:

<PushButton buttonData="load">
<buttonPressListeners> function buttonPressed(button) {
            loadData();
       }
</buttonPressListeners> </PushButton>

i get the following exception:

javax.script.ScriptException: sun.org.mozilla.javascript.internal.EcmaError: ReferenceError: "loadData" is not defined.



Greg Brown schrieb:
Hi all,

You may have noticed another change I recently checked in - a <wtkx:script> tag is no longer 
required for element-based event handlers. Since the scripting language is now specified at the page 
level, the <wtkx:script> tag is no longer needed here. This helps to further reduce the amount 
of "clutter" in your scripted WTKX files.

This does mean that you can no longer use script defined in an external file to 
implement event handlers. Though that was previously supported, it was counter to the 
intent of the inline event handlers, which are meant to place the event handler logic 
near the element to which it applies. You can, of course, still define 
<wtkx:script> blocks elsewhere that do include externally defined script files.

Let me know if you have any questions...

Greg


Reply via email to