Script search not working?

If you find an issue in LiveCode but are having difficulty pinning down a reliable recipe or want to sanity-check your findings with others, this is the place.

Please have one thread per issue, and try to summarize the issue concisely in the thread title so others can find related issues here.

Moderator: Klaus

Post Reply
stam
Posts: 3064
Joined: Sun Jun 04, 2006 9:39 pm

Script search not working?

Post by stam » Sun Apr 30, 2023 3:25 am

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.

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4168
Joined: Sun Jan 07, 2007 9:12 pm

Re: Script search not working?

Post by bn » 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

stam
Posts: 3064
Joined: Sun Jun 04, 2006 9:39 pm

Re: Script search not working?

Post by stam » Sun Apr 30, 2023 2:07 pm

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

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4168
Joined: Sun Jan 07, 2007 9:12 pm

Re: Script search not working?

Post by bn » Sun Apr 30, 2023 2:28 pm

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

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10309
Joined: Wed May 06, 2009 2:28 pm

Re: Script search not working?

Post by dunbarx » Sun Apr 30, 2023 3:09 pm

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

stam
Posts: 3064
Joined: Sun Jun 04, 2006 9:39 pm

Re: Script search not working?

Post by stam » Sun Apr 30, 2023 11:26 pm

thank both, I'll try the one from the menu - I've been using the one in the SW window...

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10090
Joined: Fri Feb 19, 2010 10:17 am

Re: Script search not working?

Post by richmond62 » Mon May 01, 2023 8:05 am

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.

Post Reply