Caret/insert position in field

Jeff Massung massung at
Fri May 14 12:23:04 EDT 2010

I'm trying to do some interesting things that require me to know the exact
character position offset within a line in a field. Is this possible right
now in Rev? I can use the selectedLine to get the line number, but the
selectedChunk returns characters from the beginning of the field.

Is there a way for me to get the character offset to the beginning of a line
easily?  Note: I don't want to do something like

    offset(the value of the selectedLine, fld "foo")

because this can return false positives and can end up being extremely slow
when working in large files.

Thanks for any thoughts/suggestions!

Jeff M.

More information about the Use-livecode mailing list