Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!bb3.andrew.cmu.edu!newsfeed.pitt.edu!scramble.lm.com!news.math.psu.edu!news.cse.psu.edu!uwm.edu!cs.utexas.edu!howland.reston.ans.net!newsfeed.internetmci.com!news.sprintlink.net!new-news.sprintlink.net!news.emi.net!news
From: joe@teknomad.com (Joe TekNomad)
Subject: Re: Combo Boxes in Visual Works
Content-Type: Text/Plain; charset=ISO-8859-1
X-Newsreader: WinVN 0.99.5
Sender: news@emi.net (EmiNet Domain News Admin)
Organization: EmiNet Domain Internet Services (407)731-0222
Message-ID: <Dq6Dr7.JGn@emi.net>
References: <31751DD2.2D58@cape.eds.com>
Mime-Version: 1.0
X-Nntp-Posting-Host: ttyc6.emi.net
Date: Sat, 20 Apr 1996 19:21:06 GMT
Lines: 41

In article <31751DD2.2D58@cape.eds.com>, joh@cape.eds.com says...
>
>Hi,
>
>I'm sure someone already has a solution for my problem, so I'm 
>asking before trying to reinvent the wheel...
>
>I am not pleased with VisualWork's implementation of the 
>ComboBox widget.  I works quite differently from their Listbox 
>widget and requires one to convert objects to and from strings.
>
>Does anyone out there have a better ComboBox implementation 
>which allows me to add and remove objects without converting to 
>and from strings?  I guess ideally it should work very similar 
>to the Listbox implementation...
>
>Thanks in advance
>
>Josh Oh
>joh@cape.eds.com


Hi josh

I totally agree....the ComboBox implementation could do with a little extra 
work....maybe I'll have a go somtime.

In the interim you could get away with the following trick. Give the ComboBox a 
list of Associations where the key is the string to be displayed and the value 
is some object in which you are interested.

Studying the ComboBox code will reveal why it will display the string (key) 
part of the association. Of course, you are only interested in the value part.

Alternatively you can implement any object which answers to #asText and feed 
these to the ComboBox.

I hope this helps....

Joe TekNomad

