[Squeak] Need for GUI-Building-Tool

Ned Konz ned at bike-nomad.com
Tue Jul 16 14:29:58 UTC 2002


On Monday 15 July 2002 11:35 pm, Richard A. O'Keefe wrote:

> Because there is *nothing* around that could reasonably *be* its
> parent. And because there wasn't the slightest hint in the
> comments.

True. I think I remembered that I'd tried in the past to use one by 
itself and found it annoying enough that I ended up putting it in a 
parent. Though I can't remember why right now; it seems to work OK by 
itself (as you point out).

Perhaps it was the multi-selection list morph that I remembered that I 
had had problems with (at a time when the definition of the 
highlighted colors in that Morph were changing a bit, and the 
selection was invisible with certain colors).

> 	It's super simple to make (say) a PasteUpMorph or a RectangleMorph
> or=20 something to hold it.
>
> It is nowhere near as simple as NOT doing it.

You have a point there.

> 	But you wanted the wrong thing.
>
> That is not as courteously worded as I would have expected from
> someone as helpful as Ned Konz.  In fact it made me quite angry.

Sorry, Richard. Didn't mean to make you angry. Not that it's an 
adequate excuse for being graceless, but I was rather burnt-out when 
I wrote that. It was quite reasonable of you to want one to work by 
itself.

>     When a PluggableListMorph is in focus, type in a letter (or
> several letters quickly) to go to the next item that begins with
> that letter. Special keys (up, down, home, etc.) are also
> supported.
>
> That's the entire comment; take the three dots at the front
> literally. My point is not the difficulty or otherwise of using
> PluggableListMorph, BUT THE TOTALLY INADEQUATE CLASS COMMENT.

I agree that this class comment (and in fact most of the class 
comments, including those in my classes) are quite inadequate.

Perhaps now while the experience of getting one working is fresh in 
your mind you could add a few tips to the class comment and submit it 
as a [FIX]? I think that's the only way these comments are going to 
get any better.

> You can tell me that PluggableListMoprh is not what I want,
> and I'll believe you (except that it VERY NEARLY is; it required
> less hacking to get this working than the buttons-in-a-box
> approach). But it's really not nice to say I wanted the wrong
> thing.

Sorry. And anyway, I was wrong, as it does seem to work by itself.

> All that's needed is one more method
>     PluggableListMorph>>standalone: autoSize
> to be called after creation and before #openInWorld.
> and then these things would be *perfect* for my requirements, no
> extra morphs needed.  (OK, I'd have to set the #position:  by hand,
> but let's face it, I'd have to do this anyway.)

> 	It doesn't need to be in a window; a RectangleMorph is an adequate
> 	parent/background.
>
> Then why the heck can't it make its _own_ RectangleMorph when run
> freestanding?

Or just work the right way, as you point out...

> When I try it, the ListTester example chops off the bottom of
> "This is item 10", even though that's only half way down the
> rectangle. I had to manually resize the List to be the size it
> appeared to be.
>

You're right. I added this extent: call to the openList, and it 
resized. Though I don't think this is the best way to force a 
re-layout, I can't remember what was.

	lm hResizing: #spaceFill;
		vResizing: #spaceFill;
		borderWidth: 0;
		extent: p bounds extent;
		hideScrollBarIndefinitely.

> It turns out that the key point is that the changeSelected:
> selector is responsible for calling "self changed: thatSelector";
> this is not stated anywhere in the PluggableListMorph sources that
> I can see.

True. I always have to add this (after digging through the code a bit 
to remember why) when I use one and I don't see the list updating 
when I change the selection.

> At any rate, the bottom line is that if you go looking for
> PluggableListMorph tutorials, the very first one you find tells you
> that free-standing ones are OK.  Perhaps Ned Konz could add his
> ListTester example to the Swiki page?

Though since the one you found is probably quite adequate in that it 
does everything mine does without needing the extra Morph, I don't 
think that it would help any.

I'm sorry for my tone in that message, and also sorry that my advice 
wasn't correct: the PLM is, in fact, quite happy to work by itself.

I added to the Swiki PLM tutorial page a (red) comment about the 
important #changed: call that you point out above.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE




More information about the Squeak-dev mailing list