[squeak-dev] continuous display of cursor position

H. Hirzel hannes.hirzel at gmail.com
Sat Jan 5 12:29:06 UTC 2013


Hello Bob and Edgar

For the case of tracking mouse position InfoMorph and
UpdatingStringMorph do the same.

Both are subclasses of StringMorph

UpdatingStringMorph does much more though (61 instance methods, class
comment copied in below, might need some updating).

InfoMorph is a nice example how the stepping mechanism of Morphic may be used.
It only needs two method override.

--Hannes


BTW Edgar, the code you posted was corrupted, have you seen my updated version?


CLASS COMMENT of UpdatingStringMorph


A StringMorph that constantly tries to show the current data from the
target object.  When sent #step, it shows what the target objects has
(target perform: getSelector).  When edited (with shift-click), it
writes back to the target.

floatPrecision = 1. to round to integer.
floatPrecision = .1 to round to 1 decimal place, etc.

Even when ((target == nil) or: [getSelector == nil]), the user would
still like to edit the string with shift-click.

On 1/5/13, Edgar J. De Cleene <edgardec2005 at gmail.com> wrote:
>
>
>
> On 1/5/13 8:55 AM, "
>
> " <arning315 at comcast.net> wrote:
>
>>    I'm a little confused here. Did
>>
>>  Morph openInWorld
>>
>>  ever work? I've never seen a Squeak where that worked, but
>>
>>  Morph new openWorld
>>
>>  has worked everywhere I have visited.
>>
>>  Also, what does InfoMorph do for you that UpdatingStringMorph does not?
>>
>>  Cheers,
>>  Bob
>
>
> Apologize all.
>
> Too much sidras for new year :=)
>
> Yes, always was Morph new openWorld.
>
> And lucky us, no bugs
>
> Cheers and is a good news see you active on list.
>
> Edgar
>


More information about the Squeak-dev mailing list