[plt-scheme] MrEd - Read Only Editor?

From: Ben Simon (benjisimon at gmail.com)
Date: Tue Mar 11 23:26:34 EDT 2008

On Tue, Mar 11, 2008 at 11:21 PM, Ryan Culpepper <ryanc at ccs.neu.edu> wrote:

> 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?
> >
> > 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.


Interesting. Is it considered acceptable style leverage this fact and write
code that depends on this?


> Just unlock the editor before your code changes the contents and lock it
> again afterwards.


Nice, will do.


> You might also find 'begin-edit-sequence',
> 'end-edit-sequence', and 'hide-caret' useful.
>
Thanks for the pointers.

-Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20080311/504bdaa3/attachment.html>

Posted on the users mailing list.