Not-editable Note

Doug Way dway at mailcan.com
Wed Nov 17 19:20:00 UTC 2004


On Tue, 16 Nov 2004 10:02:46 +0100, "Daria Spescha"
<daria.spescha at id.unibe.ch> said:
> Sorry, I wasn't clear: Locking a TextMorph works fine. But I wanted to
> lock the textmorph contained in ScrollableField. This didn't work.

Yeah, this doesn't work... seems like a bug.  Same problem happens with
PluggableTextMorph panes in browsers, etc.  (Note that
PluggableTextMorph is a superclass of ScrollableField, so it's the
container of the TextMorph/TextMorphForEditView.)

Anyway, the PluggableTextMorph/ScrollableField/ScrollPane should really
just be passing along the mouse events to the contained TextMorph, so it
seems that if you tell the TextMorph to "be locked", that ought to work.

Something else which would be *really* useful would be to have some sort
of read-only mode for TextMorphs, which would still let you do things
like select and copy text, but it wouldn't let you edit text.  Something
like Scamper should arguably behave this way, and most UI's these days
have text widgets which can work like this.  (Of course, you could turn
read-only mode off via the menu halo if needed.)  You'd have to decide
which edit menu items should still be usable in a read-only text
morph... for example "find", "copy", "do it", "inspect it" and some
others would still be enabled, while "cut", "paste", "print it",
"accept" and others would not.

If someone wanted to implement this, I'm sure it would be harvested. ;-)

I'm not sure if this was what you were looking for, or if you didn't
want to allow selecting text either.

- Doug



More information about the Squeak-dev mailing list