In my app I used the replace-function with the following parameter:
search: “).StringValue”
replace: “).StringValue.DefineEncoding(Encodings.UTF8)”
I used “ReplaceAll” for over 700 parts in my app.
After testing it, I saw, that the replacing-function failed and my entire code is broken.
After “undoing” the changes the result is getting more worse.
results are like
“La).stringvalue.DefineEncoding(Encodings.UTF8) + data.IdxF).stringvalue.DefineEncoding(Encodings)”
“if r.IdxField(1).stringvalue.DefineEncoding(Encodi).stringvalue.DefineEncoding(Encodings.UTF8)0” OR r.IdxField(1).StringValue = “1” then"
and so on
It is not possible to replace the strings with the replace-all-function. I have to replace every single location (over 700) in my code.
And: Because I trusted Xojo, I saved the file after performing the replacements, so a lot of work after last project-backup is lost.
Yes, I made similar experiences. Never happened with RB, only lately with Xojo.
But you should be angry with yourself. A project which handles more than 700 database columns isn’t a small one. You should have started to use a version control system long time ago.
Not at the moment since this assumes we keep track of the time the search was done on each search result to know if you changed anything in the item the result represents since the search was done
We dont
Doesn’t mean “and we never will”
Just we dont right now
I think the suggestion is to disable the replace buttons if anything in the code editor changes. It wouldn’t matter if the search results are affected by the change or not.
What’s worse, if I create a new project, add an open event to the default window, do a global find “i”, add a space to the event then replace-all with “x”… it gets ugly. hit undo and kaboom Xojo crashes hard.
(I hope I saved my work in the other project I had open… whew I did)
Right… I would think anything that would cause a document to need saving could be a trigger to disable the replace functions. Search would enable them again until something changes.
I think they’re suggesting you’d have to save or re-search before you could replace.
Noooot really a fan of the idea, search and replace shouldn’t be complicated for the user.
I would think a smarter search and replace would be a better idea than a bandaid like inhibiting my replace.