Action listener issue
Tristan Richard <[email protected]>
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I have created an abstract dialog class for dialogs based on Swixml,
with a public cancelAction. (see below)
So that I can call it from my XUL code like that :
<button text="dialog.cancel" action="cancelAction"/>
/**
* This class merely defines what we need to create
* a dialog box with SwiXML
*
* @author Tristan RICHARD
*/
public abstract class SwiXMLDialog {
/**
* Rendering engine from XUL to Swing
*/
SwingEngine swix;
public Action cancelAction = new AbstractAction() {
public void actionPerformed(ActionEvent e) {
dialog.dispose();
}
};
/**
* The top UI <code>Container</code> to represent this class
*/
JDialog dialog;
...
There's something strange out there:
When I'm using Eclipse, and jre 1.4.2_04 from Sun, I have no pb.
But when my app is launched directly with the same jre, outside Eclipse,
the button doesn't execute the action code...
I assume there is a problem in action listener registration by Swix?
The problem doesn't happen if I set explicitely the action listener in
the Java code, which I'd like to avoid.
Can anyone help ?
Thx,
Tristan Richard