silly text editing question

viktoras d. viktoras at ekoinf.net
Mon Mar 23 08:55:50 EDT 2009


Hi Bob,

I used the following in my table object:
assuming table header (tab delimited list of column names) is stored in 
tabHeader variable

set the itemdelimiter to tab
put (((word 2 of the selectedLine of me) - 1) + \
          the number of items in (char 1 to (word 2 of (the 
selectedchunk of me)) of me)) mod \
          (the number of items in tableHeader) into itemNo
   if itemNo is 0 then
      put the number of items in tableHeader into itemNo
   end if
   answer itemNo

It works correctly as long as cell contents do not exceed cell size. 
Once contents of the cell exceed its size, click on the next cell 
selects text of the previous one and you get the wrong number...

Best wishes
Viktoras

Bob Sneidar wrote:
> ... So I really wanted to know which item (assuming the itemDelimiter 
> was tab) of which line was presently selected.... 




More information about the use-livecode mailing list