[Newbies] Reset Morphic Drawing After Error
karlramberg at gmail.com
Tue Feb 12 13:23:21 UTC 2013
On Tue, Feb 12, 2013 at 1:51 PM, Ben Coman <btc at openinworld.com> wrote:
> Look in Morph>>fullDrawOn:
> and how it calls >>drawErrorOn:
> Doing [ self setProperty: #errorOnDraw toValue: false ]
> should resume your regularly scheduled program.
This would be a nice addition for the debug menu of a draw error morph.
> Jeff Gonis wrote:
> Hi Everyone,
> So when I am using Morphs in Squeak I like to instantiate a morph and then
> iteratively change it on the fly, having it respond to step calls, change
> how drawing works etc. All in all, this works pretty well and is one of my
> favorite ways to develop. However, one thing that does occur from time to
> time is that I will introduce an error that is triggered during the drawOn:
> call to the Morph. When this happens the morph stays instantiated in the
> world, but its canvas is drawn all red with a yellow "X" through it,
> indicating that my drawing code has failed.
> My question is how do I cause the drawing of the morph to be reset after I
> have corrected this error in the drawing code? As it stands now I just take
> the lazy way out and re-create the morph as a new object and continue on
> with my experimentation. However, if I could reset whatever drawing state
> needs to be reset, and have the morph continue on with the fixed code, this
> would be pretty great, and get me one step closer to my ideal method of
> Thanks for your help,
> Beginners mailing listBeginners at lists.squeakfoundation.orghttp://lists.squeakfoundation.org/mailman/listinfo/beginners
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Beginners