UpdatingStringMorph for watching expressions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

UpdatingStringMorph for watching expressions

Hannes Hirzel
On 1/5/13, Juan Vuletich <[hidden email]> 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
>>

_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
Reply | Threaded
Open this post in threaded view
|

Re: UpdatingStringMorph for watching expressions

Juan Vuletich-4
Hi Hannes,

I was too sleepy that night! Thank you. The updates I just commited
include this.

Cheers,
Juan Vuletich

H. Hirzel wrote:

> On 1/5/13, Juan Vuletich <[hidden email]> 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
>>>
>>>      
>
> _______________________________________________
> Cuis mailing list
> [hidden email]
> http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org
>
>
>  


_______________________________________________
Cuis mailing list
[hidden email]
http://jvuletich.org/mailman/listinfo/cuis_jvuletich.org