View Full Version : Text field: Each line to be stored in an array

03 March 2009, 09:18 AM
Hello there.. I would like to build a simple gui in MEL that allows me to copy information into a text field in multiple lines.
Then after hitting a button "Okay" I would like each line to store separately in the same array.

Today I
went to the cinema

so my array will look like
myArray[0] = Today I
myArray[1] = went to the cinema
and so on!

Could someone mentor me how to do this?

03 March 2009, 04:42 PM
is this text coming form an external text file or is this within a text field you have already made in your GUI?

try querying the text and then using tokenize with "\n" as the separator. I am not sure if it will work, cant test it right now.

03 March 2009, 08:38 PM
Oh yes. I got some ideas.

Thank you sir.

CGTalk Moderation
03 March 2009, 08:38 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.