Find restricted to the current card?

John Dixon dixonja at hotmail.co.uk
Sun May 1 11:55:09 EDT 2011


Hi Jim...

Does it help if you set 'lockMessages to true in the 'mouseUp' handler ?

be well

> I have a field with the script:
> 
> on mouseUP
>    put the value of the clickline into tText
>    set itemdel to tab
>    put item 1 of tText into tText
>    find string  tText in field "thetext"
> end mouseUP
> 
> 
> When I click on a line in the field RR finds the string in the field "theText" and a second click on the same line finds the next instance of the string in the same field. 
> 
> But if, on subsequent clicks, it fails to find the string in the field "theText" on the current card, it goes looking for the string on any other card with a field named "theText"
> 
> Is there a way to do something like:
> 
>      find string tText in field "theText" ON THIS CARD
> 
> So that it will not jump to other cards containing a field of the same name and the same text. (Without having to go through the stack and rename fields so that there are no duplicates?)
> 
> In short, restrict the search to the current card.
> 
> Jim Hurley
 		 	   		  


More information about the use-livecode mailing list