About Store Forum Documentation Contact



Post Reply 
How do you retrieve text from a TextLine
Author Message
Brendan Offline
Member

Post: #1
How do you retrieve text from a TextLine
How do you retrieve text form a TextLine object

For example (assuming that there is text in the TextLine and the text line is limited to a size of 24 (to fit in the char array) how would I import the text from the TextLine to the char array 'text')

Code:
TextLine txtBox;
txtBox=random_objs.getTextLine("txtLineName");
char text[24];


Thanks
05-27-2011 05:15 AM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #2
RE: How do you retrieve text from a TextLine
Use parenthesis to access the text:

Code:
txtBox();
05-27-2011 07:38 AM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #3
RE: How do you retrieve text from a TextLine
txtBox(); gives you a String (16 bit, so 2 chars for each character)

Look at string.h to cast it to a CChar*, or convert to Str8 if you want an 8 bit string and continue from there.
05-27-2011 04:33 PM
Find all posts by this user Quote this message in a reply
Brendan Offline
Member

Post: #4
RE: How do you retrieve text from a TextLine
Thanks guys, really appreciate it.
05-27-2011 11:09 PM
Find all posts by this user Quote this message in a reply
Post Reply