Page 1 of 1

mobileControlGet

Posted: Fri Apr 05, 2013 7:48 pm
by Rod Edwardson
Hello all

I have a simple iOS app (Or so i thought) that I am trying to create. As it does not have "native" iOS features, such as cut copy paste in the main text box, it has been rejected. What I am having difficulty with is the multiline text object. The user types multiline text into Fld A and then by clicking on a button, text calculations take place and the resulting text is placed into Field B. Works fine with livecodes text box, aside from not having the cut copy paste features, but when using MobGui and the multiline control, I get an error stating the control is not a container. I have tried the mobileControlGet and text property with the same results. Any suggestions? Thanks in advance!

Rod

Re: mobileControlGet

Posted: Fri Apr 05, 2013 9:38 pm
by Dixie
Rod...

I have attached a stack that use iOS multiline... the text from the multiline gets put into a liveCode fld below it...

Hope it helps..

Dixie

Re: mobileControlGet

Posted: Fri Apr 05, 2013 10:03 pm
by Rod Edwardson
Thank you very much for this. I'm sure I will be able to make that work. Awesome community! Thanks again....

Re: mobileControlGet

Posted: Sat Apr 06, 2013 9:00 pm
by Rod Edwardson
One more question with regard to this. I have the example up and running fine. I have a button that will reset/clear the text in both fields.It works in the second field but not the InputID control. How can I include this functionality?I have tried the following with no results.

Code: Select all

on mouseUp
      if the environment = "mobile" then touchEnd 1
   iphoneControlSet "InputID", "text", Field "Field b"
  put "" into Field "Field b" 
          focus on nothing
end mouseUp
Thanks again!

Rod

Re: mobileControlGet

Posted: Sat Apr 06, 2013 9:36 pm
by Simon
Using Dixie's stack you can:

Code: Select all

on mouseUp
iphoneControlDelete inputID --from the closeCard
put "" into fld 1
openCard --start again
end mouseUp
Probably there are better ways.

Simon

Re: mobileControlGet

Posted: Sat Apr 06, 2013 10:12 pm
by Dixie
Rod...

Put a button on the card of the stack... and put the following into the script of the button

Code: Select all

on mouseUp
   clearFields
end mouseUp
put the 'clearFields' handler in the card script.. it will clear both the iOS multiLine control and the LC text field.

Code: Select all

on clearFields
   iphoneControlSet inputID, "text", empty
   put empty into fld 1
end clearFields
Dixie

Re: mobileControlGet

Posted: Sun Apr 07, 2013 7:13 pm
by Rod Edwardson
Thanks once again! Works great.....