How to I get clickItem?

Mark Brownell gizmotron at earthlink.net
Sun Aug 31 16:08:01 EDT 2003


On Sunday, August 31, 2003, at 12:18  PM, Mark Brownell wrote:

> on mouseUp
>   global itemArray2
>   put the clickCharChunk of myField into zap
>   put 1 into z
>   repeat
>     if itemArray2[z] >= zap then
>       put z into itemNumberIs
>       exit repeat
>     end if
>     add 1 to z
>   end repeat
> end mouseUp

oops:

on mouseUp
   global itemArray2
   put the clickCharChunk of myField into zap
   put word 2 of zap into zap -- fixed this ---------
   put 1 into z
   repeat
     if itemArray2[z] >= zap then
       put z - 1 into itemNumberIs -- fixed this ---------
       exit repeat
     end if
     add 1 to z
   end repeat
   if itemNumberIs = 0 then
     put 1 into itemNumberIs
   end if
end mouseUp





More information about the use-livecode mailing list