[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: JDialog weirdness - what to do?
From: |
Thomas Zander |
Subject: |
Re: JDialog weirdness - what to do? |
Date: |
Fri, 4 Mar 2005 10:45:13 +0100 |
User-agent: |
KMail/1.8 |
On Friday 04 March 2005 01:57, Robert Schuster wrote:
> Now, I have two questions:
> 1) Who codes such crap and are we really really forced to adopt this? (I
> propose setting the value to DO_NOTHING_ON_CLOSE if the argument is
> invalid. )
Actually; the not throwing an exception makes sense from some perverted
point of view; if future versions define another item then you can still
_set_ that item on an older version without getting an exception.
It just won't do what you expect it to do. Which in this case isn't halve
bad.
I would guess that what you set will be what you get; no matter how bad the
value is.
I do agree that the implementation should do a switch like option in this
spirit:
switch(n) { case HIDE_ON_CLOSE: hide; break;
case DO_NOTHING_ON_CLOSE:
default:
// do nothing
}
> 2) How could I test in mauve whether pressing the close button of a
> JDialog has no effect?
isShowing() ?
isDisplayable()?
Note that you need a SecurityManager that forbids exit if you want to test
the EXIT_ON_CLOSE. Not worth it IMO.
--
Thomas Zander
pgp9BDouydBJS.pgp
Description: PGP signature