Trapping pasteKey message in the Rev IDE
tsj at unimelb.edu.au
Thu Feb 28 18:36:44 EST 2008
On 29/2/08 10:28 AM, "Scott Rossi" <scott at tactilemedia.com> wrote:
> Recently, Terry Judd wrote:
>>> Terry, you can override nearly any message by trapping it in a
>>> frontScript handler inserted into the message path after Rev loads.
>>> Plugins generally work well for this as they're loaded after Rev's own
>> Hi Richard - I actually tried inserting a frontScript with a pasteKey
>> handler included but it never fired. Given that there doesn't appear to be
>> any Rev frontscript for pasteKey I assumed that this and related message are
>> somehow handled differently in the IDE - but I'm only guessing.
> Hi Terry:
> I was all prepared to dismiss Richard's suggestion because I SWEAR I've
> tried to do what he said before, but when loading the following as a
> frontScript, I get the behavior I want (and I think you do to):
> on commandKeyDown K
> if K = "v" then put "A paste occurred"
> wait 20 with messages
> put ""
> pass commandKeyDown
> end commandKeyDown
> Using Rev 2.8.1 Win/Mac the above seems to work as expected.
Hi Scott - following Mark's suggestion I too tried a simple commandKeyDown
handler - which, as you say, works no problems. I had incorrectly assumed
that if the pasteKey message wasn't available in the IDE then trapping
commandKeyDown and testing for the 'v' key wouldn't work either.
> Scott Rossi
> Creative Director
> Tactile Media, Multimedia & Design
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
Dr Terry Judd
Lecturer in Educational Technology (Design)
Biomedical Multimedia Unit
Faculty of Medicine, Dentistry & Health Sciences
The University of Melbourne
Parkville VIC 3052
61-3 8344 0187
More information about the Use-livecode