Thanks so much Klaus!

I was doing a workaround, but your answer is really what I needed!!
Larry

----- Original Message ----- From: "Klaus major-k" <kl...@major-k.de>
To: "How to use LiveCode" <use-livecode@lists.runrev.com>
Sent: Saturday, April 12, 2014 8:46 AM
Subject: Re: lineoffset question


Hi Larry

oops, please replace "OFFSET" with "Skippy" in my example ;-)

Am 12.04.2014 um 16:44 schrieb Klaus major-k <kl...@major-k.de>:

Hi Larry,

Am 12.04.2014 um 16:38 schrieb la...@significantplanet.org:

I'm using 6.1.1 (rc 4) on XP Service Pack 3

I have the following line in my script:
set the hilitedline of field myGames to lineoffset(field myShort,field myGames) The line works just fine. However, if I add the optional Lines to Skip, like this: set the hilitedline of field myGames to lineoffset(field myShort,field myGames,1) then I get an incorrect result - the hilitedline is a line that does NOT have the string [field myShort] in it. The hilitedline is the line prior to the correct line. For example, line 67 instead of the correct line of 68. Furthermore, when I used a variable for Lines to Skip within a repeat statement and then stepped through in debugging, the variable would start off as 1, then go to 7 but in the next repeat it would revert back to 1 - even though the debug showed no change of the variable.

Any help would be appreciated.

you have to add the OFFSET manually to the resulting line number! :-)
...
put 1 into tOffset
set the hilitedline of field myGames to (lineoffset(field "myShort",field "myGames",tOffset) + tOffset)
...

And don't forget to put quotes around object names 8-)

Larry

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to