[plt-scheme] MrEd - Read Only Editor?
Ben Simon wrote:
> Hey All,
>
> Any suggestions how I can create a read only editor? That is, an editor that
> my code can append/insert into, but that users can't?
>
> I found the very helpful append-only-text% editor in the docs (
> http://tinyurl.com/38smce), but that still allow users to insert text into
> the editor.
>
> Thoughts? Or do I need to be creating a big 'ol multi line message%?
When the editor is locked (see the 'lock' method), all modifications
silently fail. So users can type in the editor and nothing happens. Just
unlock the editor before your code changes the contents and lock it
again afterwards. You might also find 'begin-edit-sequence',
'end-edit-sequence', and 'hide-caret' useful.
Ryan
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme