Find Command

Richard Gaskin ambassador at fourthworld.com
Wed Aug 1 23:13:00 EDT 2007


RG Teeter wrote:
> I am recreating some hypercard stacks.
> 
> I am having a problem with "find"
> 
> The handler below:
> 
>     on mouseUp
> 1     select the clickline
> 2     put the selectedtext into wordToFind
> 3     find string wordToFind in field "TestFld2"
> 4     put wordToFind & the result
> 5     find string "Cafe (das)" in field "TestFld2"
>    end mouseUp
> 
> line 5 works as expected.
> line 3 returns "Not Found"

Try adding a diagnostic line to check the value of the selection:

   on mouseUp
      select the clickline
      put the selectedtext into wordToFind
      find string wordToFind in field "TestFld2"
      put wordToFind & the result
      find string "Cafe (das)" in field "TestFld2"
      put wordToFind && (wordToFind = "Cafe (das)") --<
   end mouseUp

-- 
  Richard Gaskin
  Managing Editor, revJournal
  _______________________________________________________
  Rev tips, tutorials and more: http://www.revJournal.com



More information about the use-livecode mailing list