DropDownListMorph

Daniel, Sofie and Beatrice mcbracke at eircom.net
Wed Nov 22 23:37:56 UTC 2000


Thanks Joshua, that did help. I think I'm starting to get to grips with it now!

Daniel

At 08:31 22/11/00 -0500, you wrote:
>Hi Daniel,
>
>Long Answer:
>A quick look at the code :-P (Sorry, couldn't resist!) shows that
>although "items:" sets the list, "items" (which you would expect to be
>a simple accessor) is actually sending whatever message is in
>"getItemsSelector" to the "target".  By default, these are set to
>"#colorNames" and "Color" respectively (see the superclass).  The
>value you pass as an argument into "items:" will get stomped unless
>either "target" or "getItemsSelector".
>
>Short Answer:
>d _ DropDownChoiceMorph new.
>d target: nil.
>d items: (AbstractSound soundNames).
>d openInWorld.
>d inspect
>
>Hope that helps,
>Joshua
>
>On Wed, Nov 22, 2000 at 07:55:55AM +0000, Daniel, Sofie and Beatrice wrote:
> > more newbie questions ... thanks to all for help ...
> >
> > if I create and display a new instance of DropDownListMorph and initialise
> > and inspect the items list like this:
> >
> > d _ DropDownChoiceMorph new.
> > d items: (AbstractSound soundNames).
> > d openInWorld.
> > d inspect
> >
> > but then click on the list, why does the list go back to being the default
> > of a colour list? How do I stop this?
> >
> > I appreciate that I should (ideally) be able to sort a lot of these things
> > out by going through the code, but frankly, although I'm OK with 
> Smalltalk,
> > there's just too much of it to be able to untangle it right now ...
> > especially trying to work out how Morphic goes together / can be used. So
> > when something like this comes up, its back to the list.
> >
> > Thanks again
> >
> > Daniel





More information about the Squeak-dev mailing list