AlignmentMorph...?

Ned Konz ned at bike-nomad.com
Thu Aug 22 17:55:10 UTC 2002


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.

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

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.

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




More information about the Squeak-dev mailing list