on controlkeydown very slow
Stephen Barncard
stephenREVOLUTION2 at barncard.com
Mon Sep 22 18:45:53 EDT 2008
Not sure what you're trying to do here, but I'm assuming that you're
experimenting with some rev parts in your lab stack.
Answer is not so great for testing -- slow-- in this case as it
launches a new stack every time (the Answer Stack in the IDE). Why
not just use the message box or a field to show state for now?
Also see the "Save" command in the docs. Much better than trying to
use save in the IDE like the old "domenu" in HC. You have direct
script access through scripting.
If you are working toward making a 'real' application, then you
should know that very few menu items will be in the menubar unless
you add them (not even QUIT!!), you can't count on the IDE menu items
being there in a standalone.
Again, I can't say enough about the "Scripting Conferences" stacks
that are online that cover many areas and given by the 'whos who' of
the Rev world and hosted by Jacqueline Landman Gay. There's a great
stack about MENUS there by Jeanne DeVoto.
http://support.runrev.com/scriptingconferences/
>I'm doing the following and it is slow (takes a noticeable second or two)
>
>> *on* controlKeyDown pKey
>>
>> *switch* pKey
>>
>> *case* "s"
>>
>> answer "s was selected"
>>
>> *break*
>>
>> *case* "c"
>>
>> *answer* "c was selected"
>>
>> *break*
>>
>> *end* *switch*
>>
>> *end* controlKeyDown
>>
>
>Also it doesn't work if you have the cursor in the message box or maybe some
>other places. But RunRev's own command key "S" (which saves stack) happens
>instantly and it doesn't matter if the cursor is in the message box or
>anywhere. Any ideas how to get this to work more like the native stuff. I'm
>not trapping keys anywhere else. It is version 3.0
--
stephen barncard
s a n f r a n c i s c o
- - - - - - - - - - - -
More information about the use-livecode
mailing list