Page 1 of 1
Locking an ios text input with mobilecontrolset
Posted: Mon Apr 14, 2014 7:27 am
by peramangk
I've tried locking both an input and a multiline with -
mobileControlSet scrollidStudents, "enabled", false
mobileControlSet scrollidStudents, "editable", false
but they are still editable.
They need to be locked most of the time to avoid accidental changes, but still need to be viewable.
Apart from this, they are behaving as expected.
What am I missing?
Re: Locking an ios text input with mobilecontrolset
Posted: Mon Apr 14, 2014 8:51 am
by Jellicle
I use this in a current project:
Code: Select all
mobileControlSet hMultilineControlD, "editable", "false"
Works fine.
Are you sure that the script your example code is from has access to the scrollidStudents variable?
Gerry
Re: Locking an ios text input with mobilecontrolset
Posted: Mon Apr 14, 2014 10:03 am
by peramangk
I have a button on the same card as the mobile control.
It acts as a toggle for lock/unlock, containing a script to make the scroller editable/not editable (and a few other things).
I would have thought that the button has access to the properties of the scroller.
Re: Locking an ios text input with mobilecontrolset
Posted: Mon Apr 14, 2014 11:12 am
by Klaus
Hi permangk,
how and wehre did you define the ID of the new native control "hMultilineControlD"?
All scripts that will modify that native control need to have access to that variable "hMultilineControlD".
I guess that you create the scroll on "preopencard", so the handler of your button does probably not have access to that variable!
Best
Klaus
Re: Locking an ios text input with mobilecontrolset
Posted: Mon Apr 14, 2014 11:24 am
by peramangk
The id is declared as a global on the card script and the button script.
The scroller is created on openCard.
Re: Locking an ios text input with mobilecontrolset
Posted: Mon Apr 14, 2014 11:44 am
by Klaus
Aha, well, then it SHOULD work
Maybe you can post your button script?
Re: Locking an ios text input with mobilecontrolset
Posted: Mon Apr 14, 2014 2:05 pm
by peramangk
You are perfectly right Klaus - it should work and now it does work.
There was a fault in the line preceding the mobilecontrolset, so the mobilecontrolset was never called.
My apologies and thank you very much for your help.
Re: Locking an ios text input with mobilecontrolset
Posted: Mon Apr 14, 2014 2:15 pm
by Klaus
Okie Dokie
