[Newbies] Beginners Digest, Vol 123, Issue 3

Tim Cuthbertson ratcheer at gmail.com
Wed Feb 22 18:52:06 UTC 2017


Please allow me to simplify my question. I need a basic answer.

One of the articles on Morphic says you can create composite morphs either
programatically, using addMorph, or using drag and drop from the Objects
menu of the morphic World. I have done the latter, because it is easier to
design my layout that way. Once that has been done, how do I address the
submorph from a browser? If I inspect my button submorph, for example, all
it will tell me about it is "a ScriptableButton<Button>(1364754)". I have
no idea how to access that object in order to do anything with it. This is
the crux of my questions.

Thank you

Tim Cuthbertson

On Wed, Feb 22, 2017 at 10:03 AM, <
beginners-request at lists.squeakfoundation.org> wrote:

> Send Beginners mailing list submissions to
>         beginners at lists.squeakfoundation.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://lists.squeakfoundation.org/mailman/listinfo/beginners
> or, via email, send a message with subject or body 'help' to
>         beginners-request at lists.squeakfoundation.org
>
> You can reach the person managing the list at
>         beginners-owner at lists.squeakfoundation.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Beginners digest..."
>
>
> Today's Topics:
>
>    1. Re: Using squeak with a script? (H. Hirzel)
>    2. Re: Beginner Morphic Question (Tim Cuthbertson)
>    3. Re: Beginner Morphic Question (H. Hirzel)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 22 Feb 2017 15:49:35 +0100
> From: "H. Hirzel" <hannes.hirzel at gmail.com>
> To: "A friendly place to get answers to even the most basic questions
>         about Squeak." <beginners at lists.squeakfoundation.org>
> Subject: Re: [Newbies] Using squeak with a script?
> Message-ID:
>         <CAGQxfVh_a3V8qotwfQn=BMF4Rbq098hG=BZjHjs=cph3SqG32Q
> @mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> Maybe
>
>       ExternalCommandShell
>
>      http://wiki.squeak.org/squeak/6023
>
> this is of some help?
>
> --Hannes
>
> On 2/22/17, Göran Krampe <goran at krampe.se> wrote:
> > On 21/02/17 20:51, Jacques Harmand wrote:
> >> Hi list,
> >> I try to use squeak to execute the following basic Smalltalk script (in
> >> a file "hello.st <http://hello.st>")
> >> "Transcript show: 'Hello world'; cr."
> >> from the command line with Squeak.  This works as expected with both GNU
> >> Smalltalk and Pharo, but with Squeak nothing happens: Squeak seems to
> >> wait forever.  If I add
> >> "Smalltalk snapshot: false andQuit: true."
> >> after the above line, the execution of the script terminates, but
> >> without printing anything.
> >
> > I haven't looked closely at latest Squeak (perhaps Pharo has coupled
> > Transcript to stdout for headless mode?), but Transcript is not the same
> > thing as stdout - so you wouldn't see anything on stdout.
> >
> > regards, Göran
> > _______________________________________________
> > Beginners mailing list
> > Beginners at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
> >
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 22 Feb 2017 09:18:16 -0600
> From: Tim Cuthbertson <ratcheer at gmail.com>
> To: beginners at lists.squeakfoundation.org
> Subject: Re: [Newbies] Beginner Morphic Question
> Message-ID:
>         <CAAKzf7nSsRE=TSto62ae6FN--zN0bDOerSAooK61ioPMz7__nA@
> mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Date: Tue, 21 Feb 2017 22:41:36 +0100
> From: "H. Hirzel" <hannes.hirzel at gmail.com>
> To: "A friendly place to get answers to even the most basic questions
>         about Squeak." <beginners at lists.squeakfoundation.org>
> Subject: Re: [Newbies] Beginner Morphic Question
> Message-ID:
>         <CAGQxfVjPLxhKo09-c9r-1XyUMT1qjCHXF4AWRFDuvkaaUsQHaw
> @mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
>
> Have you seen this example
>
> http://wiki.squeak.org/squeak/526
>
> ?
>
> Code
>
> http://wiki.squeak.org/squeak/uploads/MorphicGUIDemo.2.cs.gz
>
> Could you please explain in more details what you would like to build?
>
> --Hannes
>
> On 2/21/17, Tim Cuthbertson <ratcheer at gmail.com> wrote:
> > I am trying to start a Morphic application. I have read a lot of
> tutorials,
> > but I can't figure out how to program my submorphs.
> >
> > I have created my top level as a subclass of PasteUpMorph, opened it, and
> > embedded a ScriptableButton and, separately, a RoundRect into which I
> have
> > embedded a TextMorph. (eventually, I plan to have five siblings of each
> of
> > these submorphs, but I'm trying to start the project, simply).
> >
> > I think I am supposed to start programming these submorphs from my
> > PasteUpMorph, in which they are all directly or indirectly embedded. If I
> > inspect the PasteUpMorph subclass, I can see the others as submorphs of
> it,
> > but if I browse it, I don't see any objects into which to put any code. I
> > just see an empty PasteUpMorph.
> >
> > How do I access and code the submorphs within subclasses (I think) of my
> > top level morph?
> >
> > Tim Cuthbertson
> >
>
> No, I had not come across that example of "How to work with multiple text
> morphs". I will study it and your other link.
>
> I am starting a project (just as an example to learn Squeak) to come up
> with a Yahtzee game clone. My text morphs will simply display a number that
> represents a randomly rolled die. The button morphs will allow the user to
> select whether a particular die is to be held from being rerolled. There
> will be an additional button to allow the user to re-roll unheld dice.
>
> I have this model working in a text-based model, but I decided to try to
> re-implement it in a morphic GUI framework.
>
> Thank you for the tips.
>
> Tim Cuthbertson
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lists.squeakfoundation.org/pipermail/beginners/
> attachments/20170222/7126e970/attachment-0001.html>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 22 Feb 2017 17:03:08 +0100
> From: "H. Hirzel" <hannes.hirzel at gmail.com>
> To: "A friendly place to get answers to even the most basic questions
>         about Squeak." <beginners at lists.squeakfoundation.org>
> Subject: Re: [Newbies] Beginner Morphic Question
> Message-ID:
>         <CAGQxfVguWDV7crtVyS9Tx++w3bhuKv45W6ThMfgRLyJO-fSqPA@
> mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> On 2/22/17, Tim Cuthbertson <ratcheer at gmail.com> wrote:
> > Date: Tue, 21 Feb 2017 22:41:36 +0100
> > From: "H. Hirzel" <hannes.hirzel at gmail.com>
> > To: "A friendly place to get answers to even the most basic questions
> >         about Squeak." <beginners at lists.squeakfoundation.org>
> > Subject: Re: [Newbies] Beginner Morphic Question
> > Message-ID:
> >
> > <CAGQxfVjPLxhKo09-c9r-1XyUMT1qjCHXF4AWRFDuvkaaUsQHaw at mail.gmail.com>
> > Content-Type: text/plain; charset=UTF-8
> >
> > Have you seen this example
> >
> > http://wiki.squeak.org/squeak/526
> >
> > ?
> >
> > Code
> >
> > http://wiki.squeak.org/squeak/uploads/MorphicGUIDemo.2.cs.gz
> >
> > Could you please explain in more details what you would like to build?
> >
> > --Hannes
> >
> > On 2/21/17, Tim Cuthbertson <ratcheer at gmail.com> wrote:
> >> I am trying to start a Morphic application. I have read a lot of
> > tutorials,
> >> but I can't figure out how to program my submorphs.
> >>
> >> I have created my top level as a subclass of PasteUpMorph, opened it,
> and
> >> embedded a ScriptableButton and, separately, a RoundRect into which I
> >> have
> >> embedded a TextMorph. (eventually, I plan to have five siblings of each
> >> of
> >> these submorphs, but I'm trying to start the project, simply).
> >>
> >> I think I am supposed to start programming these submorphs from my
> >> PasteUpMorph, in which they are all directly or indirectly embedded. If
> I
> >> inspect the PasteUpMorph subclass, I can see the others as submorphs of
> > it,
> >> but if I browse it, I don't see any objects into which to put any code.
> I
> >> just see an empty PasteUpMorph.
> >>
> >> How do I access and code the submorphs within subclasses (I think) of my
> >> top level morph?
> >>
> >> Tim Cuthbertson
> >>
> >
> > No, I had not come across that example of "How to work with multiple text
> > morphs". I will study it and your other link.
> >
> > I am starting a project (just as an example to learn Squeak) to come up
> > with a Yahtzee game clone. My text morphs will simply display a number
> that
> > represents a randomly rolled die. The button morphs will allow the user
> to
> > select whether a particular die is to be held from being rerolled.
>
> Then I suggest that you focus first on programming a DieMorph
>
> http://pharo.gforge.inria.fr/PBE1/PBE1ch12.html
>
> Remember: 'Where Morphic stands out'
> http://wiki.squeak.org/squeak/6528
>
> <citation>
> The (Morphjic) framework is fully in Smalltalk; there are no
> "primitive" widgets or hidden functionality. This means that there are
> no restrictions to how a morph will appear and react. There are morphs
> that behave like the widgets usually found, and therefore conventional
> interfaces can be built. But there are more interesting visual
> metaphors like CurveMorph, FishEyeMorph, EnvelopeEditorMorph, or
> SpectrumAnalyzerMorph (see the next section with a Squeak at hand to
> know them). And the framework is open end extensible. It s not
> difficult to make new visual metaphors for our own objects, which are
> perfectly integrated in the system.
> </citation>
>
> And
>     'Method for making Morphs'
>     http://wiki.squeak.org/squeak/70
>
>
> > There
> > will be an additional button to allow the user to re-roll unheld dice.
> >
> > I have this model working in a text-based model, but I decided to try to
> > re-implement it in a morphic GUI framework.
> >
> > Thank you for the tips.
> >
> > Tim Cuthbertson
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: die.png
> Type: image/png
> Size: 6879 bytes
> Desc: not available
> URL: <http://lists.squeakfoundation.org/pipermail/beginners/
> attachments/20170222/c579d022/attachment.png>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
> ------------------------------
>
> End of Beginners Digest, Vol 123, Issue 3
> *****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/beginners/attachments/20170222/9dbbe4ba/attachment-0001.html>


More information about the Beginners mailing list