lineoffset question
Klaus major-k
klaus at major-k.de
Sat Apr 12 10:46:21 EDT 2014
Hi Larry
oops, please replace "OFFSET" with "Skippy" in my example ;-)
Am 12.04.2014 um 16:44 schrieb Klaus major-k <klaus at major-k.de>:
> Hi Larry,
>
> Am 12.04.2014 um 16:38 schrieb larry at 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
klaus at major-k.de
More information about the use-livecode
mailing list