[squeak-dev] PopUpChoiceMorph Candidate for Extinction?

JohnReed Maffeo aldeveron at graffiti.net
Tue Dec 31 02:19:57 UTC 2013


> ----- Original Message -----
> From: David T. Lewis
> Sent: 12/30/13 04:13 PM
> To: The general-purpose Squeak developers list
> Subject: Re: [squeak-dev] PopUpChoiceMorph Candidate for Extinction?
> 
> On Mon, Dec 30, 2013 at 02:31:09PM -0500, JohnReed Maffeo wrote:
> > #PopUpChoiceMorph looked like the logical choice for me to use in an application I am building. When I went to learn how to use it, I used World - newMorph - from alphabetical list - P-R and selected PopUpChoiceMorph. When I selected a color from the list, I got "Error: Instances of Set are not indexable". This is a bug caused by #initalize being used to create a usable example for newMorph and getting a set rather that and array returned from its target (#Color)
> > 
> 
> Color class>>colorNames used to answer an OrderedCollection, but now it
> answers a Set. I updated PopUpChoiceMorph>>mouseDown: to convert it to
> the expected ordered collection.
> 
> > As I researched the problem, I found that the method is only used in two classes: EnvelopeEditorMorph and ScorePlayerMorph. This makes me think that it maybe a candidate for extinction or it may be a good Morphic solution that is not used very much.
> > 
> > The popup menu (a PluggableSystemWindow)that is presented when performing a findClass from the System Browser category pane looks (and performs?) similar to PopUpChoiceMorph, so my question is, should I use one over the other?
> > 
> 
> The dialog that you see in the browser is a ListChooser. This is part of
> the ToolBuilder framework. I cannot say which is the best to use. Using
> ToolBuilder is generally a good thing, but you may find it simpler to use
> PopUpChoiceMorph if you expect your application to always run in Morphic.
> 
> Dave

Thanks,
I guess there is no "best". I spent several hours today trying to figure out 
how to use the class in my app. It was not obvious where it was used 
in #EnvelopeEditorMorph, but I eventually saw it. It was hiding in a plain text 
field in the same font as several other dispaly only Morphs in the display space.

Since ToolBuilder is so widely used, I think I will take a look at it. (I am
after all trying to build a tool;) I am not tied to Morphic, I just want to 
get something that works.

johnreed




More information about the Squeak-dev mailing list