Hi:
Basically, my user is adding some data to a db either via a livecode app on a mac or on the iPhone. My user may have added that data before, so "on closeField", triggers my livecode app to check the database for similar (not identical) entries. Very, very useful.
I cannot for the life of me, work out how to replicate that functionality on iOS. Do ioS fields have scripts and messages like in livecode? If yes, how does one set the script and what messages can be used. If not - how does one get round that and replicate the functionality.
I marvel at the sheer elegance of livecode and have done all the way back to Hypercard.
Bruce
on closeField equivalent on ioS input fields
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 52
- Joined: Mon Apr 06, 2020 1:19 pm
- Location: Thailand
- Contact:
Re: on closeField equivalent on ioS input fields
Hi Bruce,
since the virtual keyboard pops up when the user starts typing into a native (mobilecontrolcreate) input field,
maybe you can script the -> keyboardDeactivated in the card script?
Seems to me like a good alternative to the non-existent "closefield" message on mobile.
Best
Klaus
since the virtual keyboard pops up when the user starts typing into a native (mobilecontrolcreate) input field,
maybe you can script the -> keyboardDeactivated in the card script?
Seems to me like a good alternative to the non-existent "closefield" message on mobile.
Best
Klaus
-
- Posts: 52
- Joined: Mon Apr 06, 2020 1:19 pm
- Location: Thailand
- Contact:
Re: on closeField equivalent on ioS input fields
Thanks Klaus (especially for the speed of your reply on a Saturday).
Hmm, I think I am too used to the genius that is livecode and these days to unfamiliar with the other ways of programming.
So iOS input fields don't have the sort of cool callbacks that livecode has then. I appreciate touch is tricky in some ways compared to a mouse.
I saw "selectedObjectChanged" which could be used at the card level BUT it doesn't work on iOS. Do you know if iOS has any equivalent? Because if the user clicks out of one input field by "clicking" / touching another - I worry that the keyboard might never be deactivated.
Hmm, I think I am too used to the genius that is livecode and these days to unfamiliar with the other ways of programming.
So iOS input fields don't have the sort of cool callbacks that livecode has then. I appreciate touch is tricky in some ways compared to a mouse.
I saw "selectedObjectChanged" which could be used at the card level BUT it doesn't work on iOS. Do you know if iOS has any equivalent? Because if the user clicks out of one input field by "clicking" / touching another - I worry that the keyboard might never be deactivated.
-
- Posts: 52
- Joined: Mon Apr 06, 2020 1:19 pm
- Location: Thailand
- Contact:
Re: on closeField equivalent on ioS input fields
Are I have just found
inputBeginEditing, inputEndEditing, inputTextChanged in the dictionary. These will substitute for on openField and on closeField and on textChanged - which is what I use mostly.
The above may help someone else.
Bruce
inputBeginEditing, inputEndEditing, inputTextChanged in the dictionary. These will substitute for on openField and on closeField and on textChanged - which is what I use mostly.
The above may help someone else.
Bruce
Re: on closeField equivalent on ioS input fields
AHA!
Thanks for the info!
Thanks for the info!