Damn pop up keyboard
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Damn pop up keyboard
Hi
I have an app and the pop-up keyboard pops up when it is launched. It makes the app look sloppy.
The card comprises of buttons and three text fields. I do not have any commands that force focus or anything like that. What I want it the card to display and allow the users to focus on the text field when the pop-up keyboard would pop up.
It sounds so simple but there must be something (obvious) I am missing as it cannot 'silence' the keyboard.
Cheers
Matt
I have an app and the pop-up keyboard pops up when it is launched. It makes the app look sloppy.
The card comprises of buttons and three text fields. I do not have any commands that force focus or anything like that. What I want it the card to display and allow the users to focus on the text field when the pop-up keyboard would pop up.
It sounds so simple but there must be something (obvious) I am missing as it cannot 'silence' the keyboard.
Cheers
Matt
Re: Damn pop up keyboard
you could try in the card script
on openCard
focus on nothing
end open card
on openCard
focus on nothing
end open card
Andy Piddock
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
https://livecode1001.blogspot.com Built with LiveCode
https://github.com/AndyPiddock/TinyIDE Mini IDE alternative
https://github.com/AndyPiddock/Seth Editor color theming
http://livecodeshare.runrev.com/stack/897/ LiveCode-Multi-Search
-
- VIP Livecode Opensource Backer
- Posts: 7233
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Damn pop up keyboard
The behavior has been around since the MetaCard days and is usually more annoying than useful. LC will focus on the first editable field on the card when the card is opened, which on mobile forces the keyboard to display.
The behavior depends on the setting of traversalOn. The workaround is to set the traversalOn of the field to false on preOpenCard and set it back to true after the card is drawn.
The behavior depends on the setting of traversalOn. The workaround is to set the traversalOn of the field to false on preOpenCard and set it back to true after the card is drawn.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Damn pop up keyboard
As a different approach, I added a card with nothing on it except a JPG to act as the first screen of the stack - becoming the splash screen
I added this code to the card
In the IDE it works but when pushed to the iPad, it does not work.
If I put the code into a button on the front screen and push it to the iPad, it works.
Why would the code not execute on the iPad?
I added this code to the card
Code: Select all
on opencard
wait 2 seconds
go to card "Input card"
end opencard
If I put the code into a button on the front screen and push it to the iPad, it works.
Why would the code not execute on the iPad?
-
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
- Contact:
Re: Damn pop up keyboard
Hi Matt,
You may try a send in time message (not tested on iOS)
Best regards
Jean-Marc
You may try a send in time message (not tested on iOS)
Code: Select all
on opencard
send "goMyCard 2" to me in 2 seconds
end opencard
on goMyCard pNum
go to cd pNum
end goMyCard
Jean-Marc
https://alternatic.ch
Re: Damn pop up keyboard
You mean :
Code: Select all
on preOpenCard
set the traversalOn of fld "test" to false
end preOpenCard
on openCard
set the traversalOn of fld "test" to true
end openCard
-
- VIP Livecode Opensource Backer
- Posts: 7233
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Damn pop up keyboard
Almost. The card isn't fully redrawn until opencard finishes, so it's more reliable to send a message in time to reset traversalOn.
Code: Select all
on preOpenCard
set the traversalOn of fld "test" to false
end preOpenCard
on openCard
send "resetFld" to me in 1
end openCard
on resetFld
set the traversalOn of fld "test" to true
end resetFld
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Damn pop up keyboard
Ok. This worked. Thanks
I am still fascinated by why this did not move to the second card.
This also did not work
LC just ignored it entirely when deployed to the iPAD. In the IDE it worked perfectly.
Any ideas? (There is something to learn here..)
Code: Select all
on preOpenCard
set the traversalOn of fld "test" to false
end preOpenCard
on openCard
send "resetFld" to me in 1
end openCard
on resetFld
set the traversalOn of fld "test" to true
end resetFld
Code: Select all
on opencard
wait 2 seconds
go to card "Input card"
end opencard
Code: Select all
on opencard
send "goMyCard 2" to me in 2 seconds
end opencard
on goMyCard pNum
go to cd pNum
end goMyCard
Any ideas? (There is something to learn here..)
-
- VIP Livecode Opensource Backer
- Posts: 7233
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Damn pop up keyboard
It should have worked, there's nothing wrong with the handlers you posted. Try it in a new test stack with two cards and see if it works there. If so, something else in your scripts is probably interfering. I'd use the second set of handlers, it's usually better to let openCard complete before navigating elsewhere.
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: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Damn pop up keyboard
The behavior described comes into play when a LiveCode field has the lowest order number of controls on a card. Good discussion about ways to handle that, but I'm still wondering something more fundamental:
Have you spent enough time attempting to actually edit text using a LiveCode field (as opposed to a scripted OS-native field) on a mobile device to determine if it will be at all satisfactory for your users' needs?
Designed as they are for desktop use, where they meet user expectations very well, most people find the complete absence of common UI support for mobile editing tasks somewhere between cumbersome and disturbing, which is why script access was provided for true OS-native fields.
Have you spent enough time attempting to actually edit text using a LiveCode field (as opposed to a scripted OS-native field) on a mobile device to determine if it will be at all satisfactory for your users' needs?
Designed as they are for desktop use, where they meet user expectations very well, most people find the complete absence of common UI support for mobile editing tasks somewhere between cumbersome and disturbing, which is why script access was provided for true OS-native fields.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Damn pop up keyboard
Hi Forthword
I have to say I am not following the conversation.
I dragged a text field from the toolbar, dropped it where I wanted it and there it is.
I don't think I know what you are referring to as OS- Native field. I am aware of Mac Native fields however in all the software I have written, I have just used the standard 'field' tool and it has worked.
Screen placement was critical as the keyboard does take up a lot of space and without planning, it can hide the entry box.
The software is working (and has been). It was just a matter of suppressing the 'traverasalon' field until outside of opencard to get it to work.
M@
I have to say I am not following the conversation.
I dragged a text field from the toolbar, dropped it where I wanted it and there it is.
I don't think I know what you are referring to as OS- Native field. I am aware of Mac Native fields however in all the software I have written, I have just used the standard 'field' tool and it has worked.
Screen placement was critical as the keyboard does take up a lot of space and without planning, it can hide the entry box.
The software is working (and has been). It was just a matter of suppressing the 'traverasalon' field until outside of opencard to get it to work.
M@
Re: Damn pop up keyboard
Hey Mv,
I *think* he is talking about something referred to in this fund raising campaign -
Apparently there are downsides to these fields/controls as well, since they don't (apparently) behave exactly like you'd expect a regular control to.
I *think* he is talking about something referred to in this fund raising campaign -
so apparently there is some way *in code* to create this native control for mobile, instead of picking one off the tools palette, but I wasn't able to find a good source of reference to post as to how to do it. I did find a native scroller lesson, and this on text controls, maybe this will be of some help.Stretch Goal 3 – Native Field Widget
LiveCode currently has an extremely extensive cross-platform text field control, however it has a downside in that it doesn’t feel entirely native on mobile platforms – particularly on iOS where copy/paste and other actions use a custom iOS-only user interface. Right now you can create a ‘native’ field control on iOS and Android which present these features, but it’s a very clunky process as you can’t manipulate them like you can all the LiveCode controls you are familiar with.
We will develop a new native field widget that will hook into the native field on each mobile platform...
Apparently there are downsides to these fields/controls as well, since they don't (apparently) behave exactly like you'd expect a regular control to.
-
- VIP Livecode Opensource Backer
- Posts: 9834
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Re: Damn pop up keyboard
How to your users adjust text selection in the field without the selection handles that OS-native fields use? How do your users invoke the standard context menu OS-native fields provide?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn