[Newbies] Another newbie Morphic question

mike clemow gelfmuse at gmail.com
Tue Feb 6 02:05:44 UTC 2007


> I'm wondering why when you drop a JPG on the world it becomes a
> SketchMorph and not an ImageMorph.

Honestly, I hadn't even thought of dropping an image file onto the
world.  I had created a SketchMorph with the sketch editor at first.
Eventually, after reading the same entry you just mentioned on the
wiki, I changed my approached and subclassed ImageMorph, overriding
the initialize method with a minor change that used my rubber ducky
image as a form instead of the default image.

In the end, I decided to go back and do a few more morphic tutorials
using the immediate, incremental strategy (like the Counter Tutorial).
 I think this project is better suited for that way of programming,
and I clearly need a better grip on Morphic.  At least I have my ducks
in a row now.  :)

Thanks a bunch,

On 2/5/07, Brad Fuller <brad at bradfuller.com> wrote:
> mike clemow wrote:
> > Hi All,
> >
> > I'll be perfectly frank: I'm making a simulation of Robotic Rubber
> > Duckies in a swimming pool.  Ideally, I'd like to import an image file
> > and have my "duckMorph" wear that image as a suit.  I have created a
> > sketchMorph, but I don't know how to programmatically instruct a morph
> > to look like that sketch.  I'm not sure I understand the differences
> > between sketchMorph and imageMorph.  I also am unsure whether I need
> > to use an image file read/writer, like PNGReadWriter in order to do
> > this.  In short, I don't know where to begin.
> It is recommended on the squeak wiki that ImageMorph should be used
> instead of SketchMorph:
> http://wiki.squeak.org/squeak/1372
> I'm wondering why when you drop a JPG on the world it becomes a
> SketchMorph and not an ImageMorph. Was it every thought to change this too?
> >
> > I'm still in the very early stages of this.  At the moment all I want
> > to do is create a morph and tell it to wear my duck-suit :) and then
> > I'm going to work that code into a proper duckMorph class with the
> > appropriate methods to simulate the actual robotic versions.
> >
> > If someone could just point me in the right direction...
> >
> > Thanks in advance,
> > Mike
> >
> >
> --
> brad fuller
> www.bradfuller.com
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners


More information about the Beginners mailing list