[racket] text%, keymap%, copy/paste question

From: Matt Jadud (jadudm at gmail.com)
Date: Thu Jun 6 08:49:03 EDT 2013

Hi Laurent,

Many thanks!

The thing worth noting from a document management/improvement perspective:
I have never seen the framework collection.

(Both are possible), but either:

1. I really missed something obvious somewhere, or

2. No search of mine in the docs ever turned up this very useful collection
of tools.

If it is possible that #2 is more the case than #1, I'd like to offer a
polite suggestion to the PLT team to make this information more obvious to
users of the docs. I spend most of my time in racket/gui, and had no idea
racket/framework had some Swiss army knives, if you will.


On Thu, Jun 6, 2013 at 3:13 AM, Laurent <laurent.orseau at gmail.com> wrote:

> As I understand it, `add-text-keymap-funcions' makes these functions
> mappable, but does not give you the default mappings.
> You can either add the keybindings yourself, or you can use the
> framework's procedure `keymap:get-editor' which gives you default bindings.
> Here is a working example:
> https://gist.github.com/Metaxal/5719809
> Laurent
> On Thu, Jun 6, 2013 at 6:30 AM, Matt Jadud <jadudm at gmail.com> wrote:
>> Hi all,
>> I would like my text% to have copy/paste abilities. Actually, I'd settle
>> for a user being able to copy out of a text% object. I was under the
>> impression that I could use set-keymap and add-text-keymap-functions to get
>> me there, but I'm not having much luck. What is the right/better approach?
>> I thought something like
>> (define text (new text%))
>> (define keymap (new keymap%))
>> (add-text-keymap-functions keymap)
>> (send text set-keymap keymap)
>> would be along the right lines, but no?
>> Pointers appreciated,
>> Matt
>> ____________________
>>   Racket Users list:
>>   http://lists.racket-lang.org/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130606/a1b15443/attachment-0001.html>

Posted on the users mailing list.