AlignmentMorph...?

goran.hultgren at bluefish.se goran.hultgren at bluefish.se
Fri Aug 23 07:47:52 UTC 2002


Hi all!

Ned Konz <ned at bike-nomad.com> wrote:
> On Thursday 22 August 2002 12:38 am, goran.hultgren at bluefish.se wrote:
> 
> > 1. Why is it still being used? Chess even uses it and that is
> > written by Andreas Raab I think AFTER he did the TableLayout stuff
> > etc. Or am I wrong? Andreas?
> 
> I don't think there's anything wrong with AlignmentMorph; it's just 
> that adding them *just to get alignment behavior* is no longer 
> needed.

Ok, so what is AlignmentMorph good for then? If id doesn't add anything
useful then IMHO it should be removed. It just confuses the hell out of
people. Somewhere it says "deprecated", and then it still pops up all
over the place.

And NO class comment and I simply will just not say what I think of
that. (holding breath for 10 seconds, ok, fine now...)

> I do think that the common uses of AlignmentMorph should be covered by 
> constructors and initializers in Morph. So you could go:
> 
> 	myMorph beAlignmentRow
> 
> or
> 	BorderedMorph newRow

Sounds dandy to me.

> or something similar.
> 
> > 2. What should I use instead? Some examples use a RectangleMorph as
> > a general container, some other use a BorderedMorph I think and so
> > on. Hmmm, I will read up on this more but perhaps you can give me
> > some short fast answers here...
> 
> I would suggest that in many cases where an AlignmentMorph was used 
> merely to provide alignment, you can get by with one less morph by 
> moving the layout into its parent.

Well, yes. But they where probably used as "boxes" (rows, columns) so I
still need such a general container "box".

Btw, I fixed a... well, it's rough to call it a "bug" but anyway, I
modified SystemWindow>>paneColor to work with subclasses of SystemWindow
that are "their own" model and thus has no model. It works fine with my
browser (it get's nice colors like all the rest and is configurable
under "appearance->window colors" etc. I could post a FIX for this
including some fixes to ArchiveViewer so that it too can get a funky
color! :-)

regards, Göran



More information about the Squeak-dev mailing list