[Cuis] UpdatingStringMorph for watching expressions

H. Hirzel hannes.hirzel at gmail.com
Wed Jan 16 03:28:43 CST 2013


On 1/5/13, Juan Vuletich <juan at jvuletich.org> wrote:
> Hi Hannes,
>
> I added UpdatingStringMorph to be compatible with Squeak's. The Squeak
> code works now.
>
> Cheers,
> Juan Vuletich

Thank you, having several of them in a SystemWindow is handy for
watching expressions while debugging. I can easily do  with them a
specialized 'Expression watch window'.

However the code for UpdatingStringMorph  still needs two fixes


1) Method #step

Instead of
	
    self contents: self world activeHand morphPosition printString


needs to be something like


    step
	
       self contents: (target perform: getSelector)


2) Example call in class comment should be


    UpdatingStringMorph new
         target: [self runningWorld activeHand morphPosition asString];
         getSelector: #value;
         stepTime: 10;
         openInWorld


   Cuis uses #morphPosition instead of #position


--Hannes


> H. Hirzel wrote:
>> Juan,
>> And could we please have something like the following Squeak code
>>
>>
>> UpdatingStringMorph new
>>      target: [World activeHand position asString];
>>      getSelector: #value;
>>      stepTime: 10;
>>      openInWorld
>>
>> By Bob Arning,
>> taken from
>> http://lists.squeakfoundation.org/pipermail/squeak-dev/2013-January/167575.html
>>
>> The Squeak code does not work in Cuis.
>>
>> It gives a continuous display of the mouse position coordinates.
>>
>> --HH
>>




More information about the Cuis mailing list