Identifying the itemOffset
Gregory Lypny
gregory.lypny at videotron.ca
Wed Nov 17 12:30:25 EST 2004
Hello everyone,
I have a field with a one line and ten items that are tab delimited,
and the textStyle of each item is set to link. I've written a simple
field handler that identifies the item offset, so that I can sort
another field according to that item. The handler below returns the
total number of items (always ten) and the item offset of the item
clicked, so I should get (10 and 1), (10 and 2), ..., (10 and 9), (10
and 10), depending on what I click on. The problem is, when I click on
the tenth item, I get (10 and 7)! What am I doing wrong. Any advice
would be much appreciated.
Greg
on mouseUp
set the itemDelimiter to tab
get the first line of me
put "(" & the number of items in it && "and" && the itemOffset(the
clickText,it) & ")"
end mouseUp
More information about the use-livecode
mailing list