using chunks

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
churchken
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 66
Joined: Sun Apr 15, 2007 2:54 pm

using chunks

Post by churchken » Sun Jul 08, 2007 5:26 pm

Hi,

Using a "repeat", it is straight forward to put line 4 to line 150 of fld"text" into a new variable.

For really large sections of text, the repeat loop takes a long time to do the task. Is it possible to use "chunk" to put that same section of text into a new variable with a single line of code?

Thanks for any pointers.
Ken

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sun Jul 08, 2007 7:13 pm

Hi Ken,

Doesn't the following line do what you need?

put line 4 to 150 of fld "The Text" into myNewVar

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

churchken
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 66
Joined: Sun Apr 15, 2007 2:54 pm

chunks

Post by churchken » Sun Jul 08, 2007 7:27 pm

Hi, Mark,


Boy, it's always the simplest things that "get ya".

I had tried that approach, but with "lines" not "line" 4 to 150, and it generated an error in the script.

Thanks a bunch.
Ken

Post Reply