Getting the line number of a script

Phil Davis davis.phil at comcast.net
Thu Jun 8 14:09:41 EDT 2006


One idea: You could use lineOffset with a line number from the 
executionContexts as the starting point. Not perfect, but more accurate 
than lineOffset without it.

Phil Davis


Duong Le wrote:

>I'm looking for a way to get the line of a script.
>
>For example,
>1 global tVar
>2
>3 on mouseup
>4   do stuff
>5   put (magical function/code to retrieve this line
>number) into tVar
>6   do more stuff
>7 end mouseup
>
>Basically I want "3" when I access tVar.  Putting the
>script of the object into a variable and then doing a
>lineoffset seems like it'd be too much work and give
>false results if the line of code appears more than
>once.
>  
>



More information about the use-livecode mailing list