Yup: a lot.

I've got a text, in a field ("xText"), that contains the phrase "Ruyton of the Eleven Towns."

[ Don't worry why it is "Ruyton of the Eleven Towns.": just part of an ongoing, slightly kinky relationship with someone at LC central. ]

Now . . .

I can do this sort of thing:

on mouseDown
   put empty into fld "zText"
   put fld "xText" into exTEXT
   if matchChunk(exText,"Ruyton of the Eleven Towns.")  then
      --do something magical
      end if
end mouseDown

And the matchChunk will prove positive . . .

Now what I would like to do is dlete the chunk "Ruyton of the Eleven Towns."

from the string variable . . . BUT . . . if I "try to be clever":

on mouseDown
   put empty into fld "zText"
   put fld "xText" into exTEXT
   put "Ruyton of the Eleven Towns." into CHK
   if matchChunk(exText,CHK)  then
delete CHK from exTEXT
      end if
end mouseDown

the coloured line throws a "big, bad, bluey".

Richmond.
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to