mobileControlGet

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Rod Edwardson
Posts: 23
Joined: Sun Mar 03, 2013 1:09 am

mobileControlGet

Post by Rod Edwardson » Fri Apr 05, 2013 7:48 pm

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

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: mobileControlGet

Post by Dixie » Fri Apr 05, 2013 9:38 pm

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
Attachments
text.livecode.zip
(2.01 KiB) Downloaded 225 times

Rod Edwardson
Posts: 23
Joined: Sun Mar 03, 2013 1:09 am

Re: mobileControlGet

Post by Rod Edwardson » Fri Apr 05, 2013 10:03 pm

Thank you very much for this. I'm sure I will be able to make that work. Awesome community! Thanks again....

Rod Edwardson
Posts: 23
Joined: Sun Mar 03, 2013 1:09 am

Re: mobileControlGet

Post by Rod Edwardson » Sat Apr 06, 2013 9:00 pm

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

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Re: mobileControlGet

Post by Simon » Sat Apr 06, 2013 9:36 pm

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
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: mobileControlGet

Post by Dixie » Sat Apr 06, 2013 10:12 pm

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

Rod Edwardson
Posts: 23
Joined: Sun Mar 03, 2013 1:09 am

Re: mobileControlGet

Post by Rod Edwardson » Sun Apr 07, 2013 7:13 pm

Thanks once again! Works great.....

Post Reply