[e-lang] Why is javax.swing.ActionEvent.getActionCommand() suppressed? (and a CapDesk bug)

Kevin Reid kpreid at mac.com
Wed Mar 19 15:08:39 EDT 2008

(Quoting off-list message, with permission)

On Mar 18, 2008, at 16:51, Marc Stiegler wrote:

> Folks,
> You can turn on java.awt.ActionEvent.getActionCommand(); it was shut
> off primarily to minimize analysis, (having now analyzed it) not
> because it was unsafe.

OK; I'll commit the enabling before my installer work.

> Having said that, the supporting reason for shutoff was that I
> couldn't identify a compelling reason for turning it on. For the
> specific example Kevin gives, identifying which button was pressed in
> the JFileChooser, I would have expected to use the chooser's return
> value:
>     int returnVal = chooser.showOpenDialog(parent);
>     if(returnVal == JFileChooser.APPROVE_OPTION) { ... }

This is a blocking, modal-UI operation (as one can tell from that it  
returns a result synchronously). The former makes it inappropriate  
for use from E.

Kevin Reid                            <http://homepage.mac.com/kpreid/>

More information about the e-lang mailing list