Re: [racket-users] How to add undo functionality to text% editor?

2016-09-20 Thread Alex Harsanyi
On Wednesday, September 21, 2016 at 10:42:33 AM UTC+8, Robby Findler wrote: > It is a performance issue and the default saves memory when one creates a lot > of little text% objects.  > > > Maybe we should add something to the docs. Where did you look? The overview section for editors could inc

Re: [racket-users] How to add undo functionality to text% editor?

2016-09-20 Thread Robby Findler
It is a performance issue and the default saves memory when one creates a lot of little text% objects. Maybe we should add something to the docs. Where did you look? Robby On Wednesday, September 21, 2016, Alex Harsanyi wrote: > Thanks for that, it worked. > > Is there a reason why a new text%

Re: [racket-users] How to add undo functionality to text% editor?

2016-09-20 Thread Alex Harsanyi
Thanks for that, it worked. Is there a reason why a new text% object has undo disabled? I could not find any mention of it in the documentation and 'set-max-undo-history' is not the first place one would look :-) Thanks again, Alex. On Tuesday, September 20, 2016 at 10:14:03 PM UTC+8, Matthe

Re: [racket-users] How to add undo functionality to text% editor?

2016-09-20 Thread Matthew Flatt
Use the `set-max-undo-history` method to enable undo history: (send m-edit set-max-undo-history 1000) At Tue, 20 Sep 2016 06:24:49 -0700 (PDT), Alex Harsanyi wrote: > Consider the following example (this is pretty much the code from > http://docs.racket-lang.org/gui/editor-overview.html?q=text

[racket-users] How to add undo functionality to text% editor?

2016-09-20 Thread Alex Harsanyi
Consider the following example (this is pretty much the code from http://docs.racket-lang.org/gui/editor-overview.html?q=text%25 except I also added a text-field%): #lang racket/gui (define f (new frame% [label "Simple Edit"] [width 200] [height 200]))