Can anyone help me learn the 'modern' way of laying out morphs? I'm trying to create a stack-based ('RPN') calculate in Squeak (more as a way of learning the language and environment than because the world needs another calculator). I've been digging through 'Squeak: Open Personal Computing and Multimedia", which is a bit dated. The section on Morphic recommends using 'AlignmentMorph', but the comments for this class (in Squeak 3.10) suggest it is no longer needed.
So, what is the best way to layout a set of morphs? At least for now, all I need is a grid of buttons, that will look sensible when the parent calculator morph is resized.
Thanks in advance,
Mike
********************************************************************** This electronic message together with any attachments is confidential. If you receive it in error: (i) you must not use, disclose, copy or retain it; (ii) please contact the sender immediately by reply email and then delete the emails. Views expressed in this email may not be those of the Airways Corporation of New Zealand Limited **********************************************************************
On Thu, Oct 30, 2008 at 9:32 AM, Gauland, Michael < Michael.Gauland@airways.co.nz> wrote:
Can anyone help me learn the 'modern' way of laying out morphs? I'm trying to create a stack-based ('RPN') calculate in Squeak (more as a way of learning the language and environment than because the world needs another calculator). I've been digging through 'Squeak: Open Personal Computing and Multimedia", which is a bit dated. The section on Morphic recommends using 'AlignmentMorph', but the comments for this class (in Squeak 3.10) suggest it is no longer needed.
So, what is the best way to layout a set of morphs? At least for now, all I need is a grid of buttons, that will look sensible when the parent calculator morph is resized.
Just use AlignmentMorph.
I don't understand any of the comments about it being deprecated. AlignmentMorph is still used throughout the image and works well enough.
Gulik.
Hello Michael,
GM> Can anyone help me learn the modern way oflaying out GM> morphs? Im trying to create a stack-based (RPN)calculate in GM> So, what is the best way to layout a set of morphs? At GM> leastfor now, all I need is a grid of buttons, that will look GM> sensible when theparent calculator morph is resized.
TableLayout is your friend here. The class comment gives some hints. A week or so ago there was a discussion about Morphic table layouts, there you can find hints where to get grid layouts.
In general you can send a Morph layoutPolicy: TableLayout new
I suggest you create a Morph, add a TableLayout like above, bring up the halo, the red button offers layout.
There you can experiment and see the options you have.
If you don't look into the thread in Squeak dev, beware TableLayout is no real table layout but a row or column layout.
El 10/29/08 5:32 PM, "Gauland, Michael" Michael.Gauland@airways.co.nz escribió:
Can anyone help me learn the modern¹ way of laying out morphs? I¹m trying to create a stack-based (RPN¹) calculate in Squeak (more as a way of learning the language and environment than because the world needs another calculator). I¹ve been digging through Squeak: Open Personal Computing and Multimedia², which is a bit dated. The section on Morphic recommends using AlignmentMorph¹, but the comments for this class (in Squeak 3.10) suggest it is no longer needed.
So, what is the best way to layout a set of morphs? At least for now, all I need is a grid of buttons, that will look sensible when the parent calculator morph is resized.
Thanks in advance, Mike
Building a Calculator was done as tutorial.....
Check http://wiki.squeak.org/squeak/5791
Sorry I don't have time to complete the "bad english" version, bud some pictures in original work sure was enough for smart newbies.
And AligmentMorph is long, long , long time obsolete and no project using it should born in XXI century.
Edgar
beginners@lists.squeakfoundation.org