Missing keyUp
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 9580
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Missing keyUp
Richmond.
Just a gadget to see when the message is trapped, and that every time it is the dialog presents something completely different.
Craig
Just a gadget to see when the message is trapped, and that every time it is the dialog presents something completely different.
Craig
Re: Missing keyUp
Craig,
Since I can't make it fail here I'm grasping at straws, but:
(1) Your keyUp handler in the card script includes the parameter, "x"; but the message sent by the button or from the Message Box does not pass that parameter.
(2) Since you are initiating the message from a handler instead of from the keyboard, why not give the handler in the card script a custom name instead of "keyUo"? Do you really want the card to respond every time a key is actually pressed?
Since I can't make it fail here I'm grasping at straws, but:
(1) Your keyUp handler in the card script includes the parameter, "x"; but the message sent by the button or from the Message Box does not pass that parameter.
(2) Since you are initiating the message from a handler instead of from the keyboard, why not give the handler in the card script a custom name instead of "keyUo"? Do you really want the card to respond every time a key is actually pressed?
Rob Cozens dba Serendipity Software Company
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
-
- VIP Livecode Opensource Backer
- Posts: 7215
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Missing keyUp
I've seen LC lose the stack focus often. When that happens I can no longer execute a handler from the message box unless I use "send" as you did. This has been going on for years. When it gets too irritating I restart LC which usually fixes it. My guess is that's what happening to you too except it doesn't account for the other keypress messages that do get sent.
Maybe the focus is moving to the message box or the message watcher? What if you close all IDE palettes and tools?
Maybe the focus is moving to the message box or the message watcher? What if you close all IDE palettes and tools?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9580
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Missing keyUp
Rob.
The parameter is optional, though always "there" as empty if nothing is written.
This was all derived from another thread, not mine, where the OP needed guidance:
https://forums.livecode.com/viewtopic.php?f=7&t=37044
There are lots of ways around the problem, but I was interested in what was actually causing the problem.
Craig
The parameter is optional, though always "there" as empty if nothing is written.
This was all derived from another thread, not mine, where the OP needed guidance:
https://forums.livecode.com/viewtopic.php?f=7&t=37044
There are lots of ways around the problem, but I was interested in what was actually causing the problem.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9580
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Missing keyUp
Jacque.
Regarding focus, Jean-Marc mentioned something similar. But I cannot send a keyUp message in a new session, opened via my tiny test stack right from the desktop, with only this in the card script:
Hiding the tools palette does nothing; the only other window shown is the test stack itself. Focus seems to "stay" on that little stack, by virtue of watching its titlebar, which stays intact.
Oh, did I mention that trashing the prefs a few weeks ago fixed this for a while? Oh, oh, and did I mention that trying my test stack in v.8.1 worked fine until I tried it in v.8.6, and then it never worked again, including back in 8.1, and especially back where I am now, in 9.6.1.
Craig
Regarding focus, Jean-Marc mentioned something similar. But I cannot send a keyUp message in a new session, opened via my tiny test stack right from the desktop, with only this in the card script:
Code: Select all
on keyUp x
answer x
end keyUp
Oh, did I mention that trashing the prefs a few weeks ago fixed this for a while? Oh, oh, and did I mention that trying my test stack in v.8.1 worked fine until I tried it in v.8.6, and then it never worked again, including back in 8.1, and especially back where I am now, in 9.6.1.
Craig
Re: Missing keyUp
I'm afraid that i can't replicate this error either.
I created a new stack with 1 field
if i put
in the field script, it works when typing in the field.
If it put it in the card script, it works whether in the field or if no control has the focus...
sorry...
(LC 10 DP3, on MacOS)
I created a new stack with 1 field
if i put
Code: Select all
on keyUp x
answer x
end keyUp
If it put it in the card script, it works whether in the field or if no control has the focus...
sorry...
(LC 10 DP3, on MacOS)
Re: Missing keyUp
Thanks for the URL to the original post: I was wondering why keyUp was triggering the action instead of keyDown.This was all derived from another thread, not mine, where the OP needed guidance:
https://forums.livecode.com/viewtopic.php?f=7&t=37044
Rob Cozens dba Serendipity Software Company
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
Manchester, CA USA
Each new generation gives more attention to the man-made world...
and less attention to the world that made man.
Re: Missing keyUp
The mystery however remains as to why Craig can't get on keyUp to work, when it seems fine to others, myself included.
@Craig - what OS and LC version are you using? Have you tried launching LC without any plugins/extensions?
S.
@Craig - what OS and LC version are you using? Have you tried launching LC without any plugins/extensions?
S.
-
- VIP Livecode Opensource Backer
- Posts: 7215
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Missing keyUp
Right, that's part of the bug. The stack appears to have focus, "the name of this stack" in the message box returns the right name, but commands from the message box tell you the stack can't be found unless you use "send" specifically. My guess is that one of the IDE scripts is interfering with the message path.Hiding the tools palette does nothing; the only other window shown is the test stack itself. Focus seems to "stay" on that little stack, by virtue of watching its titlebar, which stays intact.
This has been going on for a long time but I haven't reported it because it isn't repeatable reliably and is fairly rare. Restarting LC fixes it.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- VIP Livecode Opensource Backer
- Posts: 9580
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Missing keyUp
HAHAHAHAHAHA,Restarting LC fixes it.
Good one, Jacque.
Craig
-
- VIP Livecode Opensource Backer
- Posts: 9580
- Joined: Wed May 06, 2009 2:28 pm
- Location: New York, NY
Re: Missing keyUp
Stam.
LC 9.6.1, 9.6.6, 8.1, 8.6
Have not tried 1.0.
And yes, without plug-ins.
But know that this missing message has shown its face in the middle of a session, where I certainly have not changed anything in the current set-up.
Craig
OS 10.15.7what OS and LC version are you using? Have you tried launching LC without any plugins/extensions?
LC 9.6.1, 9.6.6, 8.1, 8.6
Have not tried 1.0.
And yes, without plug-ins.
But know that this missing message has shown its face in the middle of a session, where I certainly have not changed anything in the current set-up.
Craig
Re: Missing keyUp
It works also with the community Edition 9 5 0 Build 15503
Re: Missing keyUp
I have checked it just again, it works with alphanumeirckeys etc., but not with enter or or shift etc.
-
- VIP Livecode Opensource Backer
- Posts: 3581
- Joined: Mon Jan 22, 2007 7:36 am
- Location: Berkeley, CA, US
- Contact:
Re: Missing keyUp
Yep - that's documented:
If the key pressed is the Return, Tab, Backspace, Delete, or Enter key, an arrow key, or a function key, no keyUp message is sent.
PowerDebug http://powerdebug.ahsoftware.net
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
PowerTools http://www.ahsoftware.net/PowerTools/PowerTools.irev
Re: Missing keyUp
Test Test Test