🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #11062

Re: JdbComboBox - Event Problems

#11062
From: Christian Streiff
Date: Tue, 13 Jul 1999 00:00
52 lines
2454 bytes
Thanks for your suggestions, they got me onto the right track.
I solved the problem with an Navigation Listener on the DataSet and it works
just fine. However, this seems to me more like a work-around than anything else.

JdbNavComboBox 'implements' NavigationListener, therefore why not fire an
appropriate (e.g actionPerformed) event within the JdbNavComboBox Class.
I would be very interested in opinions, because I feel that there are many
jbcl/jdb components that could do with better event support. - But then again,
there might be reasons for the way these classes are implemented in the way they
are, and I might just be ignorant of those reasons.

Code Extract:
    .
    .
    .
jdbNavComboBox1.getDataSet().addNavigationListener(new
borland.jbcl.dataset.NavigationListener() {
      public void navigated(NavigationEvent e) {
        jdbNavComboBox1_navigated(e);
      }
    });

    .
    .

- Christian

Matt Krevs wrote:

> I seem to remember (but dont quote me on this) that JdbComboBox may actually
> catch actionPerformed and itemStateChanged calls and translate them into
> DataSet related method calls
>
> eg dataChanged() would get called instead of actionPerformed() or
> itemStateChanged().
>
> Have a look at the JdbComboBox source code.
>
> Christian Streiff <cstreiff@indigo.ie> wrote in message
> news:378A0E71.F136FB95@indigo.ie...
> > Does anyone know why the JdbComboBox and the JdbNavComboBox don't fire
> > an actionPerformed event or itemStateChanged event
> > when an item in the drop-down list is selected?
> > I find this quite strange, since the JComboBox fires those events when a
> >
> > item is selected.
> > - So how can I make the  JdbComboBox / JdbNavComboBox to fire an event
> > when an item is selected?
> >
> > Thank you very much for your help
> > Christian
> >
Technical Details
Message-ID: <378B16CB.9CF4D906@indigo.ie>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <378A0E71.F136FB95@indigo.ie> <7mdr22$rp122@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 111d45,3e56c2f146840895
X-Google-Attributes: gid111d45,public
From: Christian Streiff <cstreiff@indigo.ie>
Subject: Re: JdbComboBox - Event Problems
Date: 1999/07/13
Message-ID: <378B16CB.9CF4D906@indigo.ie>
X-Deja-AN: 500463294
Content-Transfer-Encoding: 7bit
References: <378A0E71.F136FB95@indigo.ie> <7mdr22$rp122@forums.borland.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
Organization: Another Netscape Collabra Server User
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.swing