#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)
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?
jrm
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
On 30-12-2013, at 11:31 AM, JohnReed Maffeo aldeveron@graffiti.net wrote:
#PopUpChoiceMorph looked like the logical choice for me to use in an application I am building.
Wow, yet *another* menu related class? That’s what, 42?
I think maybe, perhaps, just possibly, we should consider this as a target for drastic simplifimicisation for the next release.
tim -- tim Rowledge; tim@rowledge.org; http://www.rowledge.org/tim Strange OpCodes: XM: Exclusive Maybe
squeak-dev@lists.squeakfoundation.org