Basic Morph question - updating

Guenther Schmidt gue.schmidt at web.de
Sun Feb 6 01:37:12 UTC 2005


Stephan,

that is a bit disappointing to be honest.

A view polling its model is not what I like, I guess I'll stop right 
here and get back to Dolphin.

The reason why I (briefly) checked back with Squeak was that in Dolphin 
you (seem) to have to use the standard widgets (while writing fancy UIs 
being very difficult) and I had seen some screenshots from the Exobox 
project that were really great.

But when Morphic is about views polling their models in intervals, 
thanks but no thanks.


Günther



Stephan B. Wessels schrieb:
> Günther,
> 
> The details tell the story.
> 
> Each Morph has control over this.  If the Morph sub-class implements the 
> #step method then it will get updated at regular intervals.
> The update interval is controlled by the #stepTime method.  If that same 
> Morph wants to be updated at a non-default rate it would answer the 
> number of milliseconds between each step in the #stepTime method.
> 
> In some cases I've also seen Morphs that implement #wantsSteps to answer 
> false if they do not want to be updated.  In this manner they can still 
> implement their own #stepTime and #step methods and then control whether 
> they are active or not by use of the #wantsSteps method.
> 
> You could, with this technique, create a morph that has an idle and 
> active state.  During the active state it would perform some kind of 
> animation or other action.  Write the #wantsSteps method to answer true 
> when the morph is active and false when it is idle.  Write the #step 
> method to make the incremental animation happen.  Write the #stepTime 
> method to control how much time should elapse (in milliseconds) between 
> each "step".  So when the #wantsStep says true, you move, and when it 
> says false you sit idle.
> 
> I used way too many words.  I hope that helps.
> 
> Cheers,
> 
>  - Steve
> On Feb 5, 2005, at 4:29 PM, Guenther Schmidt wrote:
> 
>> Hi,
>>
>> I've got a basic morph question.
>>
>> Did I understand it right, that a Morph (for instance the inspector) 
>> is updating itself by polling its model on a regular interval (500 ms)?
>>
>> Günther
>>
>>
>>
> -- 
> "Nobody can make you feel inferior without your permission."
>     Eleanor Roosevelt
> 
> 
> 




More information about the Squeak-dev mailing list