[pkg-j2se-devel] Re: j2re1.4: send ItemEvent without user action

David Herron David.Herron at Sun.COM
Mon Jan 16 16:13:40 UTC 2006


First, I don't think this has anything to do with packaging Java for 
Debian systems.

Second, what you're describing certainly sounds like a bug.  The 
java.awt.Choice and ItemEvent classes aren't supposed to be sent for an 
"add" operation.

You should take this to the vendor in question ... e.g. you said 
Blackdown's Java went into an infinite loop?  For a bug with Blackdown's 
Java package you should approach them.

- David Herron



pkg-j2se-devel-request at lists.alioth.debian.org wrote:

>Date: Mon, 16 Jan 2006 00:05:19 +0100
>From: Joan Queralt <jqueral7 at xtec.net>
>Subject: [pkg-j2se-devel] j2re1.4: send ItemEvent without user action
>To: pkg-j2se-devel at lists.alioth.debian.org
>Message-ID: <1137366319.5613.4.camel at localhost.localdomain>
>Content-Type: text/plain
>
>Subject: j2re1.4: send ItemEvent without user action
>Package: j2re1.4
>Version: 1.4.2.03-1
>Severity: normal
>
>The following code:
>
>Choice _idioma;
>
>(...)
>
>   int totalIdiomes=Etiquetes.idiomes.length;
>   _idioma.removeAll();
>   for (int i=0;i<totalIdiomes;i++) {
>      _idioma.add(Etiquetes.idiomes[_numIdioma][i]);
>   }
>
>generate some ItemEvent's that are sended to the Choice ItemListener's.
>This differs from Sun Virtual Machine behaviour and from what the Sun
>documentation says: "Class ItemEvent: This high-level event is generated
>by an ItemSelectable object (such as a List) when an item is selected or
>deselected by the user", because they aren't produced by user action.
>
>The following code will work on Sun JRE but not on Blackdown:
>
>Choice _idioma;
>
>(...)
>
>public void itemStateChanged(ItemEvent arg0) {
>    _numIdioma=_idioma.getSelectedIndex();
>    int totalIdiomes=Etiquetes.idiomes.length;
>    _idioma.removeAll();
>    for (int i=0;i<totalIdiomes;i++) {
>        _idioma.add(Etiquetes.idiomes[_numIdioma][i]);
>    }
>}
>
>because it leads to an infinite loop.
>
>Please, contact me if this message isn't clear enough or if you need a
>full code example.
>
>Regards,
>
>Joan Queralt
>
>-- System Information:
>Debian Release: 3.1
>  APT prefers testing
>  APT policy: (500, 'testing')
>Architecture: i386 (i686)
>
>
>
>  
>



More information about the pkg-j2se-devel mailing list