Line offset of an item (and other similar functions).

J. Landman Gay jacque at hyperactivesw.com
Tue Jan 25 17:13:20 EST 2005


On 1/25/05 6:32 AM, Alex Tweedly wrote:

 > Nope, spoke too soon. That looks convincing, and worked on my initial
 > testing - but doesn't actually work properly in all cases.
 >
 > The problem is that the CRs are included within items - so given data 
like
 > a,abc,1
 > b,def,2
 > c,qwe,3
 > etc.,  item 1 is "a", item 2 is "abc", item 3 is "1
 > b" (i.e. including the cr), item 4 is "def", etc.
 >
 > Clearly, that means itemOffset will never match what I think of as items
 > that are first (or last) on each line.

Oh. Right. I forgot about wholematches when I sent the script. I 
tinkered some more with this, but couldn't find anything better than 
Geoff's suggestion. I guess you'll have to do some benchmarking, but his 
method looks pretty good.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com


More information about the use-livecode mailing list