Article View: borland.public.jbuilder.java.api
Article #3572Re: Welcome to the Borland JBuilder news groups
From: Jeroen Zwartepoorte
Date: Tue, 04 Nov 1997 00:00
Date: Tue, 04 Nov 1997 00:00
56 lines
1936 bytes
1936 bytes
Hi, I've discovered a bug in the borland JavaVM! I've got a simple dialog box that contains : 2x java.awt.List 2x java.awt.Button 2x borland.jbcl.control.ButtonControl +several bevelPanels Now the dialog looks something like this: ----------------------------------- | | ButtonAdd -> | List1 List2 | | ButtonRemove <- | ----------------------------------- | ButtonOK ButtonCancel ----------------------------------- Both the Lists are allowed to have multipleselections When Moving the items from one list to another i use List.getSelectedItems() to get the array of selected Strings. I then add every single string in the array to the other list. This works fine... Until i want to know the length of the array (how many options have been selected?). I do this like this: String items[] = list2.getSelectedItems(); System.out.println(items.length); But when i select for example 4 items, system.out.println prints '0'!!! For some reason the array is being emptied when calling items.length!? When i remove the "System.out.println(items.length);" from my application, everything works fine again... I managed to reproduce the bug EVERY time i ran/rebuild my application (and after changing some code). Greetings, Jeroen Zwartepoorte DIC Information Consultants Bisonspoor 7005 Maarssenbroek The Netherlands jeroen@xs4all.nl
Technical Details
Message-ID:
<345F379C.DC60F90F@xs4all.nl>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<340EF48F.2CE4684A@borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,294dc9438ca4ac52 X-Google-Attributes: gid1089d0,public From: Jeroen Zwartepoorte <jeroen@xs4all.nl> Subject: Re: Welcome to the Borland JBuilder news groups Date: 1997/11/04 Message-ID: <345F379C.DC60F90F@xs4all.nl> X-Deja-AN: 286993655 References: <340EF48F.2CE4684A@borland.com> Reply-To: jeroen@xs4all.nl To: Andrew Bennett <abennett@borland.com> Organization: None Newsgroups: borland.public.jbuilder.java.api