[Newbies] Reset Morphic Drawing After Error

H. Hirzel hannes.hirzel at gmail.com
Tue Feb 12 14:11:56 UTC 2013


Or it could be put into a 'Notes on Morphic development' page in the
help system.

To do this get a most recent trunk image from
http://www.squeakci.org/job/SqueakTrunk/ do the fix and submit it to
the inbox.

--Hannes

On 2/12/13, karl ramberg <karlramberg at gmail.com> wrote:
> 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.
>
> Karl
>
>>
>> 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
>> development.
>>
>> Thanks for your help,
>> Jeff
>>
>>
>>
>> ------------------------------
>>
>> _______________________________________________
>> Beginners mailing
>> listBeginners at lists.squeakfoundation.orghttp://lists.squeakfoundation.org/mailman/listinfo/beginners
>>
>>
>>
>> _______________________________________________
>> Beginners mailing list
>> Beginners at lists.squeakfoundation.org
>> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>>
>>
>


More information about the Beginners mailing list