Find Item's Line w/offset

Jeanne A. E. DeVoto jeanne at runrev.com
Thu Jan 23 16:09:01 EST 2003


At 12:23 PM -0800 1/23/03, mark mitchell wrote:
>I want to find an item in a container, but only whole matches.  Then I
>want to delete the LINE which contains that item.  So I need that line
>number information.  I know you can get this with the FoundLine, but is
>there any way to get it using offset?  Since I need whole matches to an
>item, I cannot use 'lineOffset' but must use 'itemOffset'.  So is there
>anyway to convert from item number to a line number of a container?

set the wholeMatches to true
put itemOffset(whatToFind,theContainer) into myItemNumber
put the number of lines in (item 1 to myItemNumber of theContainer) \
   into theItemLine

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - The Solution for Software Development
http://www.runrev.com/





More information about the use-livecode mailing list