Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6248016

Removal of the selected item at runtime removes all the elements in the choice, XToolkit

XMLWordPrintable

    • b43
    • sparc
    • solaris_10
    • Verified

      I am removing the selected item in the choice inside the ItemListener by calling Choice.remove(index). I expect the selected item to be removed one by one when I press the down arrow. But on XToolkit, pressing the down arrow once removes all the elements in the choice. I could see so many item events being triggered repeatedly on the console.

      This is reproducible only on XToolkit since Tiger and not occuring on Win32 / Motif. On Win32 and Motif, items are getting removed one by one. I was under the assumption that no item event must be triggered when doing something programmatically such as adding or removing an item but looks like it is being triggered on XToolkit.

      I have attached a sample test. Execute the sample test on XToolkit. Click on the choice. A drop-down will appear. Now press the down arrow. You will see some garbage in the drop-down and eventually all the items would have been removed.
      ###@###.### 2005-03-30 14:39:18 GMT

            dcherepanov Dmitry Cherepanov
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: