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)._______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
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 <[hidden email]> 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 > Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
In reply to this post by Tim Cuthbertson
Date: Tue, 21 Feb 2017 22:41:36 +0100 No, I had not come across that example of "How to work with multiple text morphs". I will study it and your other link.From: "H. Hirzel" <[hidden email]> To: "A friendly place to get answers to even the most basic questions about Squeak." <[hidden email]> Subject: Re: [Newbies] Beginner Morphic Question Message-ID: <[hidden email]> Content-Type: text/plain; charset=UTF-8 Have you seen this example http://wiki.squeak.org/squeak/ ? Code http://wiki.squeak.org/squeak/ Could you please explain in more details what you would like to build? --Hannes On 2/21/17, Tim Cuthbertson <[hidden email]> 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 > _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
On 2/22/17, Tim Cuthbertson <[hidden email]> wrote:
> Date: Tue, 21 Feb 2017 22:41:36 +0100 > From: "H. Hirzel" <[hidden email]> > To: "A friendly place to get answers to even the most basic questions > about Squeak." <[hidden email]> > Subject: Re: [Newbies] Beginner Morphic Question > Message-ID: > > <[hidden email]> > 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 <[hidden email]> 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. 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 > _______________________________________________ Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners die.png (9K) Download Attachment |
This
https://ci.inria.fr/pharo-contribution/job/UpdatedPharoByExample/lastSuccessfulBuild/artifact/book-result/Morphic/Morphic.html might be useful as well. On 2/22/17, H. Hirzel <[hidden email]> wrote: > On 2/22/17, Tim Cuthbertson <[hidden email]> wrote: >> Date: Tue, 21 Feb 2017 22:41:36 +0100 >> From: "H. Hirzel" <[hidden email]> >> To: "A friendly place to get answers to even the most basic questions >> about Squeak." <[hidden email]> >> Subject: Re: [Newbies] Beginner Morphic Question >> Message-ID: >> >> <[hidden email]> >> 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 <[hidden email]> 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 >> > Beginners mailing list [hidden email] http://lists.squeakfoundation.org/mailman/listinfo/beginners |
Free forum by Nabble | Edit this page |