Trapping pasteKey message in the Rev IDE

Terry Judd tsj at unimelb.edu.au
Thu Feb 28 06:32:53 EST 2008


On 28/2/08 9:54 PM, "Mark Schonewille" <m.schonewille at economy-x-talk.com>
wrote:

> Hi Terry,
> 
> Running a project used by students in the IDE seems like a bad idea to
> me.

It's only going to be used by a single developer who is putting the content
together. The finished project will be a standalone application with all the
content in a backend database.
> 
> I just tried it and I see there is no way to trap the pasteKey handler
> before Revolution gets it, at least not in a field script for
> instance, but you can trap the commandKeyDown handler instead to
> achieve what you want.

You know what, I just assumed that wouldn't work given that the pasteKey
message was being intercepted (dodgy logic on reflection).

Thanks!

Terry...
> 
> Best regards,
> 
> Mark Schonewille
> 
> --
> 
> Economy-x-Talk Consulting and Software Engineering
> http://economy-x-talk.com
> http://www.salery.biz
> 
> Convert colours between different colour spaces with Color Converter.
> Download at http://economy-x-talk.com/cc.html
> 
> 
> 
> On 28 feb 2008, at 11:36, Terry Judd wrote:
> 
>> On 28/2/08 9:20 PM, "Mark Schonewille" <m.schonewille at economy-x-talk.com
>>> 
>> wrote:
>> 
>>> Hi Terry,
>>> 
>>> The pasteKey message is probable trapped by Revolution in the front
>>> scripts.
>> 
>> Hmm, I checked those but there was no sign of it (or cutKey for that
>> matter).
>>> 
>>> Why do you want to trap it?
>> 
>> I'm working on a set of in-house authoring tools for a big educational
>> project we're about to start on and want them to run in the IDE so I
>> can
>> take advantage of the various property inspector bits and bobs.
>> Anyway, the
>> text content is being marked up using custom style tags and I'd like
>> to be
>> able to copy the style tags and associated parameters to the
>> clipboard,
>> select the text I want to wrap it around in the 'code' editor and
>> then use a
>> pasteKey handler to sub the selected text into the style tag data
>> and then
>> paste the lot into the selected chunk. This all works (provided you
>> suspend
>> the IDE) without having to track and restore selections as the user
>> jumps
>> from one context to another.
>> 
>> Regards,
>> 
>> Terry...
>> 
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution

-- 
Dr Terry Judd
Lecturer in Educational Technology (Design)
Biomedical Multimedia Unit
Faculty of Medicine, Dentistry & Health Sciences
The University of Melbourne
Parkville VIC 3052
AUSTRALIA

61-3 8344 0187




More information about the Use-livecode mailing list