Updating a PluggableTextMorph and having the change displayed

Ned Konz ned at squeakland.org
Tue Jan 20 18:12:10 UTC 2004


On Tuesday 20 January 2004 9:49 am, Ken Causey wrote:

> I'm working on adding some status feedback to BFAV2.  Right now simply
> in the form of a new small pane at the bottom that contains a
> PluggableTextMorph.

Is the status feedback coming from the UI thread? If not, you will have to use 
addDeferredUIMessage:.

> I'm finding that requesting an update of the get selector is not
> resulting in the PluggableTextMorph being redrawn and showing the new
> text.  I hunt and hunt and find (through a long drawn out process) that
> in PluggableTextMorph>>update: a change of appendEntry forces a
> refreshWorld

You should not have to send refreshWorld. The ordinary invalidation should 
handle that.

> but a change of the get selector does not.  What is the 
> logic here?  Is there some good reason why one does the refresh and the
> other does not?  Assuming there is, should I be myself forcing a refresh
> when I know that the text has changed and should be redrawn?

No.

> I find refrences to stepping and addDeferredUIMessage: in the archives
> but that all seems 'out of model' when we are talking about a simple
> text display widget that should immediately reflect changes in its
> model.

You could use an UpdatingStringMorph for such a thing; its stepping polls a 
pluggable selector.



More information about the Squeak-dev mailing list