Native text control problem

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
info26
Posts: 47
Joined: Tue May 17, 2011 10:14 am

Native text control problem

Post by info26 » Fri Jul 08, 2011 8:00 am

Hello everyone

I am a little confused, I do not find an example of how to get the text of a native text control.

There is a fine example of how to change all the properties of the text but do not understand how to get the content

Do you have suggestions

thanks

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Native text control problem

Post by Klaus » Fri Jul 08, 2011 10:54 am

Hi info26,

...
put iphoneControlGet(ID_of_Your_Control, "text") into tEditedText
...
Please check:
http://lessons.runrev.com/spaces/lessons
And the "iOS Release Notes"!


Best

Klaus

info26
Posts: 47
Joined: Tue May 17, 2011 10:14 am

Re: Native text control problem

Post by info26 » Sat Jul 09, 2011 9:58 am

OK the code
put iphoneControlGet(ID_of_Your_Control, "text") into tEditedText
is correct if I put a number of control_ID

But if I have a card with 10 text area how can I distinguish the text areas from each other?

How can I obtain the id of the object

Thank's

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Native text control problem

Post by Klaus » Sat Jul 09, 2011 10:30 am

Hi info26,
How can I obtain the id of the object?
Well since YOU created them (I boldly presume) you should
be able to mange your objects somehow. 8)

I think you can also give your native iOS controls a NAME instead an ID.


Best

Klaus

Jellicle
Posts: 453
Joined: Thu Feb 24, 2011 11:07 am

Re: Native text control problem

Post by Jellicle » Sat Jul 09, 2011 12:02 pm

info26 wrote: How can I obtain the id of the object
When you create the control with iphoneControlCreate, the ID is returned in the result. So, for example:

iphoneControlCreate "input"
put the result into InputControlID

InputControlID would contain the ID of the control.

All this is in the iOS release notes.

Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.

Post Reply