Page 1 of 1
Script search not working?
Posted: Sun Apr 30, 2023 3:25 am
by stam
Hi all,
I do occasionally refactor code and rename variables to make more semantic sense - previously I would use the search/replace options to change all occurrences which used to work fine and was the only way to manage more complex apps with long scripts.
With recent versions and also version 9.6.9 now, I increasingly find searching in scripts does not work, at least when choosing more complex search options. It doesn't find all occurrences, you certainly cannot replace replace all even if it is on the same script (the option to replace is greyed out).
Is this something funky with my installation or have others noticed this as well?
S.
Re: Script search not working?
Posted: Sun Apr 30, 2023 8:42 am
by bn
Hi Stam,
Find and Replace was broken and is fixed in 9.6.9
https://quality.livecode.com/show_bug.cgi?id=24001
Unfortunately unlike the suggestion I made in bug 24001 it still defaults to section "Look in" to "all available stacks".
If you change that to "current tab" the option to replace is not greyed out any more.
Kind regards
Bernd
Re: Script search not working?
Posted: Sun Apr 30, 2023 2:07 pm
by stam
bn wrote: ↑Sun Apr 30, 2023 8:42 am
Hi Stam,
Find and Replace was broken and is fixed in 9.6.9
https://quality.livecode.com/show_bug.cgi?id=24001
Unfortunately unlike the suggestion I made in bug 24001 it still defaults to section "Look in" to "all available stacks".
If you change that to "current tab" the option to replace is not greyed out any more.
Kind regards
Bernd
Thanks Bernd,
I'm using 9.6.9... and apart from this issue, it fails to find all occurrences of a string in the stackfile, which is crucial to renaming things... basically the only way to correct renaming issues is to run the app, and tackle each individual error as it happens, which isn't idea, as it's always possible to miss somethingl...
Not sure if it's possible but grateful for any suggestions...
BW
Stam
Re: Script search not working?
Posted: Sun Apr 30, 2023 2:28 pm
by bn
Hi Stam,
I was talking about the "find and replace" from within the Script Editor.
Have you tried "Find and Replace" from the Edit Menu? Or is that "Find and Replace" that you were using?
For me "Find and Replace" from the Edit Menu the "replace" option is not greyed out after a first run with a hit.
Kind regards
Bernd
Re: Script search not working?
Posted: Sun Apr 30, 2023 3:09 pm
by dunbarx
I use Find and Replace always from the menu. The "main" one. Never an issue with finding all instances of a string.
If you have a large project, and you know that you only need to search the current card instead of the whole stack or whole stockpile, the search is MUCH faster.
Craig
Re: Script search not working?
Posted: Sun Apr 30, 2023 11:26 pm
by stam
thank both, I'll try the one from the menu - I've been using the one in the SW window...
Re: Script search not working?
Posted: Mon May 01, 2023 8:05 am
by richmond62
When LC became completely Unicode compliant I used the main Search & Replace to convert about 100,000 numToChar statements to numToCodePoint statements: as far as I recall the whole thing took less than 5 minutes.