Daniel, Sofie and Beatrice
mcbracke at eircom.net
Sun Nov 26 15:11:11 UTC 2000
Thanks David. Yes, taking a look at how a class is used would help - how do
I do that? I just got to look at this one as it was the first one that
seemed to do roughly what I want. But there are other candidates.
Yes, I'm having fun exploring Squeak, and it is impressive. The main
restriction is to have the time to find the bits of it that are really
useful. It seems that with Smalltalk, the language syntax is very simple,
but in its place there is a huge class library to try to learn to use. But
I like the idea, and what it can do.
At 09:39 23/11/00 -0500, you wrote:
>At 7:55 +0000 11/22/00, 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
>Something I find useful is to look at all users of a class to see how the
>class is typically used. There is but one user of DropDownChoiceMorph. The
>protocol is a bit odd, exposing a call to #maxExtent: to compute the
>space necessary for the list you give it (but then not computing widths or
>heights for updated lists obtained by sending getItemsSelector).
>Attached is a small update to DropDownChoiceMorph which fixes that problem
>by automatically calling #maxExtent: internally. It also makes a border be
>the default. (There is an example in a class method).
>It's also not clear why the parent (PopUpChoiceMenu) doesn't compute font
>widths or heights. It's also a bit odd that PopUpChoiceMenu has colors as
>default menu items instead of using a nil selector. I can't find any
>callers that use the default. I suspect that both were done in a hurry and
>just need some cleanup.
>Hope you're having fun with Squeak!
>David N. Smith
>IBM T J Watson Research Center
>Any opinions or recommendations
>herein are those of the author
>and not of his employer.
More information about the Squeak-dev