Something strange happened when trying to close the application i ported
to ULC 6.1 using the default dialog close icon. Nothing happened!

I discovered the problem was simple but very very strange... it happens
only i call the setModal(true) method of ULCDialog.

Take this simple test:

ULCDialog dialog = new ULCDialog() ;
dialog.setModal(true);
ULCButton button = new ULCButton("Close");
button.addActionListener(new IActionListener() {
        public void actionPerformed(ActionEvent actionevent) {
                ApplicationContext.terminate();
        }
});

dialog.setDefaultCloseOperation(ULCDialog.DO_NOTHING_ON_CLOSE);
dialog.addWindowListener(new IWindowListener() {
        public void windowClosing(WindowEvent arg0) {
                ApplicationContext.terminate();
        }
});
dialog.add(button);
dialog.setVisible(true);

Using this sample you'll notice that you cannot close the dialog but
only using the ULCButton and not close icon on the dialog itself.

Changing the second line with setModal(false) everything works but...
the dialog isnt modal anymore!

Am i right or not?

I traced the code on the client side and this problem seems to make
postInitialization method never return on UIDialog. This makes the
WindowListener never added to that dialog.

Best regards,
Paolo Scaffardi
GFP Lab s.r.l.
http://www.gfplab.com
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to