Re: Text field in Windows standalone not receiving keyboard focus

2021-02-01 Thread Bob Sneidar via use-livecode
Ah. I should’ve thought of that. I tried years ago to create a kind of kiosk 
app that used a web browser thinking I could put transparent buttons over top 
of the browser object, but as soon as the browser object got focus, I could no 
longer click buttons. The first click worked then nothing worked.

Bob S


On Jan 31, 2021, at 7:28 PM, Andrew at MidWest Coast Media via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

It turns out that this bug was actually another bug manifesting itself. There 
was a rogue browser widget (not visible) hiding in another group on the card 
gobbling up keystrokes on Windows platform. 
https://quality.livecode.com/show_bug.cgi?id=19023 


What’s worse is that the same bug bit me in the ass a year ago too. Fool me 
once, shame on you.

-Andrew Bell

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Text field in Windows standalone not receiving keyboard focus

2021-01-31 Thread Andrew at MidWest Coast Media via use-livecode
It turns out that this bug was actually another bug manifesting itself. There 
was a rogue browser widget (not visible) hiding in another group on the card 
gobbling up keystrokes on Windows platform. 
https://quality.livecode.com/show_bug.cgi?id=19023 


What’s worse is that the same bug bit me in the ass a year ago too. Fool me 
once, shame on you. 

-Andrew Bell


> 
> Try comparing the properties of a group that works with the one that 
> doesn't. Also compare individual field properties, in particular check the 
> traversalOn, autoHilite, and lockText. That alone wouldn't explain why it 
> appears to fix itself occasionally, but could point to a script that 
> changes one of these properties.
> 
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software | http://www.hyperactivesw.com
> On January 28, 2021 3:33:39 PM Andrew at MidWest Coast Media via 
> use-livecode  wrote:
> 
>> I have an app with a group of fields who are struggling to accept keyboard 
>> input. It seems to just be 1 group of 4 fields on a single card (that has 
>> been noticed). You can click in the field and the blinking I-bar is 
>> inserted, but typing on the keyboard does nothing. Pasting text into any of 
>> these fields seems to unlock the ability to type, as does switching to 
>> another application and switching back, but only until you leave the card 
>> and come back again.
>> 
>> This ONLY happens in executable on Windows, not in IDE and never on Mac 
>> (where I am developing which is why I missed the bug in testing). Once you 
>> unlock 1 of the 4 fields in the group they all unlock until you leave the 
>> card and come back where the problem manifests again.There is another group 
>> of text files (hidden so not on screen the same time as the offending 
>> group) that accepts keyboard input fine without any hacks which points to a 
>> problem with the group. There are no scripts on the field or group itself. 
>> I have already tried a ?focus on nothing? without any luck.
>> 
>> -Andrew Bell
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your 
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Text field in Windows standalone not receiving keyboard focus

2021-01-29 Thread Curry Kenworthy via use-livecode


Andrew:

> I can’t add a breakpoint because the Remote Debugger
> will take focus from the standalone

Behold the power of the log file:
Logs DOMINATE standalone debugging for all but the simplest issues.
They don't affect focus, either.

(Remote Debugger is cool, but like most things, has big limitations.)

> If I add an answer “foo” the focus is properly shifted
> to the field after the modal.

Yes, I've seen that happen! And getting focus back by switching the app.
Familiar, but can't recall the culprit. Also, might have been on Mac:
one Mac project with a window shape and floating window acted up.
The more complexity a stack has, the more things can interact.

I do remember this: it didn't take long to fix or work around!
That's why it was a fleeting memory. So take heart.

If pasting can work around it, so can your code. Take charge of focus.
Or even better, finish debugging and fix the underlying cause.

> The card also doesn’t receive this message until the focus issue
> is resolved as described before

So someone else is receiving those keystrokes. Who?
Could be a script. A stack. A control that doesn't pass the message.
(And for each of those - could be yours, or LiveCode's/third party.)

Use your log, record where the focus is, pin down the perp.
Record the relevant field properties too, just in case.

>> - any front script or other library intercepting keystrokes?
> Nope

Is that proven, or just AFAYK?

But I wouldn't be surprised if it's a stack or other group/control.

> Datagrid, but not on this field or parent group.

DG is beautiful, but so often introduces issues.
Of course I wouldn't rip it out at this late point.
It might not be the culprit. Even if it is, you can work around.

Good news: pretty easy to fix or work around this!
I've had a very similar issue

Best wishes,

Curry Kenworthy

Custom Software Development
"Better Methods, Better Results"
LiveCode Training and Consulting
http://livecodeconsulting.com/

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Text field in Windows standalone not receiving keyboard focus

2021-01-29 Thread Peter Bogdanoff via use-livecode
Andrew, are you using Parallels/Windows for testing?

I just saw something somewhat similar where I suddenly couldn’t paste into a 
field; typing did work (Windows 10 running in Parallels, in IDE, not runtime). 
I went to Parallels’ settings for Windows, unchecked and rechecked “Share 
clipboard” and it now worked—could paste text.

Peter Bogdanoff

> On Jan 29, 2021, at 2:48 PM, Andrew at MidWest Coast Media via use-livecode 
>  wrote:
> 
> 
>> - add a keydown handler in the field. Is it received?
> This is received under the same circumstances described before. I can’t add a 
> breakpoint because the Remote Debugger will take focus from the standalone, 
> which is one of the known workarounds. If I add an answer “foo” the focus is 
> properly shifted to the field after the modal.
> 
>> - add a keydown handler in the card. Who's the target?
> The card also doesn’t receive this message until the focus issue is resolved 
> as described before… interesting. 
> 
>> - any front script or other library intercepting keystrokes?
> Nope
> 
>> - any behaviors?
> Datagrid, but not on this field or parent group.
> 
>> And if the normal culprits are exonerated, don't forget the more obscure 
>> and exotic possibilities:
>> 
>> - white text, or textshift?
> Nope, standard text that displays as soon as focus is properly received.
> 
>> - text added but clipped by a tabstop?
> No tabs
> 
>> - does all your startup code get executed? (And preopencard/stack code?)
> No errors thrown
> 
>> - is this a real Windows machine or virtualized setup?
> Win10 Boot Camp install running through Parallels, but the client who 
> complained is on native Win10 box.
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Text field in Windows standalone not receiving keyboard focus

2021-01-29 Thread Andrew at MidWest Coast Media via use-livecode

> - add a keydown handler in the field. Is it received?
This is received under the same circumstances described before. I can’t add a 
breakpoint because the Remote Debugger will take focus from the standalone, 
which is one of the known workarounds. If I add an answer “foo” the focus is 
properly shifted to the field after the modal.

> - add a keydown handler in the card. Who's the target?
The card also doesn’t receive this message until the focus issue is resolved as 
described before… interesting. 

> - any front script or other library intercepting keystrokes?
Nope

> - any behaviors?
Datagrid, but not on this field or parent group.

> And if the normal culprits are exonerated, don't forget the more obscure 
> and exotic possibilities:
> 
> - white text, or textshift?
Nope, standard text that displays as soon as focus is properly received.

> - text added but clipped by a tabstop?
No tabs

> - does all your startup code get executed? (And preopencard/stack code?)
No errors thrown

> - is this a real Windows machine or virtualized setup?
Win10 Boot Camp install running through Parallels, but the client who 
complained is on native Win10 box.




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Text field in Windows standalone not receiving keyboard focus

2021-01-28 Thread J. Landman Gay via use-livecode
Try comparing the properties of a group that works with the one that 
doesn't. Also compare individual field properties, in particular check the 
traversalOn, autoHilite, and lockText. That alone wouldn't explain why it 
appears to fix itself occasionally, but could point to a script that 
changes one of these properties.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On January 28, 2021 3:33:39 PM Andrew at MidWest Coast Media via 
use-livecode  wrote:


I have an app with a group of fields who are struggling to accept keyboard 
input. It seems to just be 1 group of 4 fields on a single card (that has 
been noticed). You can click in the field and the blinking I-bar is 
inserted, but typing on the keyboard does nothing. Pasting text into any of 
these fields seems to unlock the ability to type, as does switching to 
another application and switching back, but only until you leave the card 
and come back again.


This ONLY happens in executable on Windows, not in IDE and never on Mac 
(where I am developing which is why I missed the bug in testing). Once you 
unlock 1 of the 4 fields in the group they all unlock until you leave the 
card and come back where the problem manifests again.There is another group 
of text files (hidden so not on screen the same time as the offending 
group) that accepts keyboard input fine without any hacks which points to a 
problem with the group. There are no scripts on the field or group itself. 
I have already tried a “focus on nothing” without any luck.


-Andrew Bell
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Text field in Windows standalone not receiving keyboard focus

2021-01-28 Thread Curry Kenworthy via use-livecode



Andrew:

> You can click in the field and the blinking I-bar is inserted,
> but typing on the keyboard does nothing.

I love field topics!

Win/Mac differences can really hit you, even on a stack that you thought 
was well-tested. Because only well-tested on one platform.


This glitch sounds familiar from the past, but I've had less Mac work 
than usual for the past few months; mostly Windows. Rusty this month.

I think I've seen this, but can't remember the cause.

I've seen cases where the app or stack would lose focus.
Other cases where the control itself loses focus.
On Windows, a button may get the focus depending on properties.
But usually you would lose the blinking.

And I've seen scripts intercept the keystrokes.
They may act differently per platform.

To diagnose it methodically, if blinking really continues during typing:

- add a keydown handler in the field. Is it received?
- add a keydown handler in the card. Who's the target?
- any front script or other library intercepting keystrokes?
- any behaviors?

Knowing what control is actually getting those keystrokes will lead you 
to the culprit. (Or even whether your stack/app is getting them.)


And if the normal culprits are exonerated, don't forget the more obscure 
and exotic possibilities:


- white text, or textshift?
- text added but clipped by a tabstop?
- does all your startup code get executed? (And preopencard/stack code?)
- is this a real Windows machine or virtualized setup?

(Weird things can happen if a startup-type script is interrupted 
silently by an error.)


> This ONLY happens in executable on Windows, not in IDE

That's always the biggest tip-off.
So unless it's an LC bug/glitch, this can be effective:

- check standalone inclusions
- add error reporting to the standalone

Without reporting, errors in exe are silent - and you might say, deadly.
After an error, any code after it is not executed.

> Pasting text into any of these fields seems to unlock the ability
> to type, as does switching to another application and switching back,
> but only until you leave the card and come back again.

That's a big tip-off too. Any card script? Any paste script?
There may be a script modifying a field property.
Or another control getting in the way.
All those can be tested and confirmed. You can log field properties.

When you find it, could you let me know?
I feel like I've seen this before. and would like to job my memory

Best wishes,

Curry Kenworthy

Custom Software Development
"Better Methods, Better Results"
LiveCode Training and Consulting
http://livecodeconsulting.com/

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Text field in Windows standalone not receiving keyboard focus

2021-01-28 Thread Andrew at MidWest Coast Media via use-livecode
I have an app with a group of fields who are struggling to accept keyboard 
input. It seems to just be 1 group of 4 fields on a single card (that has been 
noticed). You can click in the field and the blinking I-bar is inserted, but 
typing on the keyboard does nothing. Pasting text into any of these fields 
seems to unlock the ability to type, as does switching to another application 
and switching back, but only until you leave the card and come back again.

This ONLY happens in executable on Windows, not in IDE and never on Mac (where 
I am developing which is why I missed the bug in testing). Once you unlock 1 of 
the 4 fields in the group they all unlock until you leave the card and come 
back where the problem manifests again.There is another group of text files 
(hidden so not on screen the same time as the offending group) that accepts 
keyboard input fine without any hacks which points to a problem with the group. 
There are no scripts on the field or group itself. I have already tried a 
“focus on nothing” without any luck.

-Andrew Bell
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode