mobilecontrols and object scripts
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 339
- Joined: Wed Jul 11, 2012 9:24 pm
mobilecontrols and object scripts
I have to use mobilecontrol fields on my android app because androids won't type into a field. Right now I have a close keyboard button that appears when the page opens - but I would prefer to have it pop up if text is entered into a field (the same time the keyboard pops up).
I am wondering if I can set a simple script -
on mousedown
set the vis of button "close_keyboard" to true
end mousedown
How do you do that with mobilecontrol?
I know about mobilecontrolcreate, mobilecontrolset, mobilecontrolget, mobilecontroldelete
There is a mobilecontroldo, but I'm not sure it is the right command or how to use it properly.
Thank you.
I am wondering if I can set a simple script -
on mousedown
set the vis of button "close_keyboard" to true
end mousedown
How do you do that with mobilecontrol?
I know about mobilecontrolcreate, mobilecontrolset, mobilecontrolget, mobilecontroldelete
There is a mobilecontroldo, but I'm not sure it is the right command or how to use it properly.
Thank you.
Re: mobilecontrols and object scripts
Hi,
this is from the "Android Release Notes":
...
The following messages will be sent to the current card of the default stack when the keyboard is shown or hidden:
keyboardActivated
keyboardDeactivated
Handle these messages to move controls or change the display layout to take account of the restricted screen area that will be available.
...
Maybe this is what you are looking for?
Best
Klaus
this is from the "Android Release Notes":
...
The following messages will be sent to the current card of the default stack when the keyboard is shown or hidden:
keyboardActivated
keyboardDeactivated
Handle these messages to move controls or change the display layout to take account of the restricted screen area that will be available.
...
Maybe this is what you are looking for?
Best
Klaus
-
- Posts: 339
- Joined: Wed Jul 11, 2012 9:24 pm
Re: mobilecontrols and object scripts
not exactly - although this is not a big issue for me - it's more a curiosity.
I want to have
On mousedown
set the vis of button "keyboard_close" to true
end mousedown
...but there is nowhere to "put" these instructions - since is it is a mobilecontrol
Right now, I have the keyboard_close button visible if there is a mobilecontrol input field on the page...but it would be slicker to have it only popup if someone used that input field.
as I said, not a big deal - since my way is quite functional, just curious. "something" currently is telling it to open a keyboard when someone clicks on the input field - it would be nice to have it also open my keyboard close button.
I want to have
On mousedown
set the vis of button "keyboard_close" to true
end mousedown
...but there is nowhere to "put" these instructions - since is it is a mobilecontrol
Right now, I have the keyboard_close button visible if there is a mobilecontrol input field on the page...but it would be slicker to have it only popup if someone used that input field.
as I said, not a big deal - since my way is quite functional, just curious. "something" currently is telling it to open a keyboard when someone clicks on the input field - it would be nice to have it also open my keyboard close button.
Re: mobilecontrols and object scripts
Hmmmm, sounds like this should work for you:
If you mean to "put a mousedown script into the native field control", not?
Code: Select all
on keyboardActivated
set the vis of button "keyboard_close" to true
end keyboardActivated
-
- Posts: 339
- Joined: Wed Jul 11, 2012 9:24 pm
Re: mobilecontrols and object scripts
yes - but where do you put the code? can you put that on the card level? There's no "object" to attach the script...
Re: mobilecontrols and object scripts
Yes, put it into the card script.
P.S.
Did you check this one already?
http://forums.runrev.com/phpBB2/viewtop ... 53&t=13453
P.S.
Did you check this one already?
http://forums.runrev.com/phpBB2/viewtop ... 53&t=13453
-
- Posts: 339
- Joined: Wed Jul 11, 2012 9:24 pm
Re: mobilecontrols and object scripts
Doesn't work - on android that is.
keyboardactivated seems to be for ios only (per the library). I was looking for something that triggers for an android mobilecontrol input field. Something triggers the android to open a keyboard...I was just curious if you could add other things like making a close button visible.
not critical - and nothing that keeps me up at night (unlike other issues have!)
good to know that there is a solution for ios.
keyboardactivated seems to be for ios only (per the library). I was looking for something that triggers for an android mobilecontrol input field. Something triggers the android to open a keyboard...I was just curious if you could add other things like making a close button visible.
not critical - and nothing that keeps me up at night (unlike other issues have!)
good to know that there is a solution for ios.
Re: mobilecontrols and object scripts
Things ain't always what they seem to be!keyboardactivated seems to be for ios only
This is from tha latest "Android Release Notes" (LC 5.5.3):
...
Activation notifications
The following messages will be sent to the current card of the default stack when the keyboard is shown or hidden:
keyboardActivated
keyboardDeactivated
Handle these messages to move controls or change the display layout to take account of the restricted screen area that will be available.
...