Search/Replace Strange Behavior

Jeanne A. E. DeVoto revolution at jaedworks.com
Fri Jul 15 14:26:16 EDT 2005


At 9:34 AM -0700 7/15/2005, Mark Swindell wrote:
>>It's a "nuance" or a "design flaw", depending on how charitable 
>>you're feeling. The replace command treats its parameters as pure 
>>text, so if you do something like
>>
>>   replace "foo" with "bar" in field "Stuff"
>>
>>you'll lose all formatting in the field. Replace seems to make a 
>>copy of the target text, then do the replace operation, and then 
>>swap the target text back into the field.
>
>It's a pretty nasty nuance, then.  How's that?  :)

Sounds about right. ;-)

>It renders the find and replace function useless for formatted text.
>And it did come as a shock, as it almost destroyed hours of work, 
>because it can't be undone.  (No one had ever mentioned that I 
>should back up my stacks regularly.) This seems like a pretty big 
>thing that ought to be addressed by the engineering corps up in 
>Edinborough, no?

Agreed. I thought there was a report on the replace command's 
behavior, but I wasn't able to find it, so I've bugzillad this as 
3008 and 3009.
-- 
jeanne a. e. devoto ~ revolution at jaedworks.com
http://www.jaedworks.com



More information about the use-livecode mailing list