Re: Why is javax.swing.ActionEvent.getActionCommand() suppressed? (and a CapDesk bug)

Kevin Reid <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
(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/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.