Not-editable Note

Daria Spescha daria.spescha at id.unibe.ch
Thu Nov 18 14:23:52 UTC 2004



> -----Ursprüngliche Nachricht-----
> Von: squeak-dev-bounces at lists.squeakfoundation.org [mailto:squeak-dev-
> bounces at lists.squeakfoundation.org] Im Auftrag von Doug Way
> Gesendet: Mittwoch, 17. November 2004 20:20
> An: The general-purpose Squeak developers list
> Betreff: Re: Not-editable Note
> 
> 
> 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

Yes, that's exactly what I was looking for (copying is not necessary,
but would be nice). I have a not-editable Subclass of ScrollableField
(which uses a subclass of TextMorphForEditView, see attachement), but I
don't think it's a nice implementation and at the moment mainly two
things are missing:
First, you can select parts, but not copy with alt-c because all
keyboard events are disabled. Second, if you add text to the content and
the text leaves the visible part of the scroller, then you can scroll,
but the scrollbar does not update correctly. Maybe I manage to change
this ...

Daria

-------------- next part --------------
A non-text attachment was scrubbed...
Name: TextFieldTrial.st
Type: application/octet-stream
Size: 4196 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20041118/cbd5ce8e/TextFieldTrial.obj


More information about the Squeak-dev mailing list