Find/Replace woes
Adrian Williams
adrian at clubtype.co.uk
Sat Nov 18 03:46:58 EST 2006
Herschel,
This works fine if the only word in the "edtText" field matches the
"edtReplace" field.
But if there are ANY other words at all in "edtText", nothing gets
replaced.
So how can Replace be made to actually replace all instances?
Should this be Replace Text rather than Replace field?
Thanks,
Adrian
On 16 Nov 2006, at 21:24, Hershel Fisch wrote:
> On 11/16/06 12:22 PM, "Adrian Williams" <adrian at clubtype.co.uk> wrote:
>>
>> SCRIPT: FIND BUTTON
>> on mouseUp
>> --set text of field "edtReplace" to ""
> Put "" into fld "edtReplace"
>> --put text of field "edtFind" into tFindText
>> -- find string tFindText in field "edtText"
> Find fld "edtFind" in fld "edtText"
>> end mouseUp
>>
>> SCRIPT: REPLACE BUTTON
>> on mouseUp
>> --get the htmlText of field "edtText"
>
>> --replace text of field "edtFind" with text of field "edtReplace" in
>> it
> Replace fld "edtFind" with fld "edtReplace" in fld edtText"
>> --set the htmlText of field "edtText" to it
>> end mouseUp
>
> Whell this is my version ? Hershel
>>
>> Thanks,
>> Adrian
>> ______________________
>> Club Type
>> http://www.clubtype.co.uk
>> adrian at clubtype.co.uk
More information about the use-livecode
mailing list