Re: Action listener issue
Frank Meissner <[email protected]>
| Newsgroups | gmane.comp.embedded.carlsbad-cubes |
|---|---|
| Message-ID | <[email protected]> |
Tristan Richard wrote:
> 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?
Hm, this sounds rather strange. I do not know of any 1.4.2_04 specific
issues there. I'm using eclipse to develop swixml applications quite
seriously and did not have any problems there either...
Please post the swix.render(...) call. I suspect a problem there.
Frank
> 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
>
>
> _______________________________________________
> Forum mailing list
> [email protected]
> http://carlsbadcubes.com/mailman/listinfo/forum_carlsbadcubes.com
>