Page 1 of 2
Search & Replace being a bit unhelpful
Posted: Sun Jan 09, 2022 3:28 pm
by richmond62
-
This is both odd and a pain-in-the-bum:
1. The button script contains significantly more than 1 incidence of the search phrase.
2. I wish to replace that search phrase, but am unable to do that owing to only one incidence being reported.
Re: Search & Replace being a bit unhelpful
Posted: Sun Jan 09, 2022 3:36 pm
by Klaus
I used the "Find and Replace" dialog just yesterday.
Yes, it does not report how many occurrences of your string were found, only where these werde found!
But will reliably replace all occurrences in the found script(s)!
Re: Search & Replace being a bit unhelpful
Posted: Sun Jan 09, 2022 3:42 pm
by richmond62
Thank you very much.
werde
It does, indeed, replace aa the
vocables.
Re: Search & Replace being a bit unhelpful
Posted: Sun Jan 09, 2022 3:44 pm
by Klaus
Yep, a little typo...
But please just try it next time, I can assure, your machine will not explode!

Re: Search & Replace being a bit unhelpful
Posted: Sun Jan 09, 2022 3:49 pm
by richmond62
Thanks, Klaus, it warks byously.

Re: Search & Replace being a bit unhelpful
Posted: Sun Jan 09, 2022 4:18 pm
by dunbarx
Richmond.
Here is a stack that does what you want. It loses all instances of "good men" in a field of text. Follow the button script...
Craig
Re: Search & Replace being a bit unhelpful
Posted: Sun Jan 09, 2022 4:20 pm
by dunbarx
Ah. did not see Klaus' post.
You can get the number of occurrences in mine by finding the number of lines of the variable "findList".
Craig
Location of Search & Replace stack.
Posted: Wed Jan 12, 2022 9:33 am
by richmond62
I should like to extend and colourise the
Find and Replace stack as:
1. I find the white-on-white tough on my eyes.
2. I would like a significantly longer
textField for the
Replace phrase.
But I cannot locate the stack . . .
-
-
I mean the right-hand stack.
Re: Search & Replace being a bit unhelpful
Posted: Wed Jan 12, 2022 9:43 am
by richmond62
Come to think of things . . .
. . . a tree diagram of all the stacks inwith the LC IDE would be extremely useful.
Re: Search & Replace being a bit unhelpful
Posted: Wed Jan 12, 2022 10:08 am
by bn
But I cannot locate the stack . . .
The stack is called "revSearch" and is located within the app bundle on Mac:
/Users/userName/Applications/
LiveCode 9.6.6 (rc 1).app/Contents/Tools/Toolset/palettes/revsearch.rev
Kind regards
Bernd
Re: Search & Replace being a bit unhelpful
Posted: Wed Jan 12, 2022 10:11 am
by richmond62
That's super: Thank you very much.
I was looking for it using the Application Browser and getting nowhere.

Re: Search & Replace being a bit unhelpful
Posted: Wed Jan 12, 2022 10:26 am
by richmond62
Thank you once again.
-
-
This modified stack is derived from the Open Source version of LC 9.6.3
Re: Search & Replace being a bit unhelpful
Posted: Wed Jan 12, 2022 10:50 am
by bn
I was looking for it using the Application Browser and getting nowhere.

When the stack is open it shows up in the Project Browser. The trick is to know the name
For that I use from the message box
then move the cursor over the stack and hit return.
For the location the same procedure as above but
Code: Select all
put the long name of the mouseStack
Kind regards
Bernd
Re: Search & Replace being a bit unhelpful
Posted: Wed Jan 12, 2022 1:15 pm
by richmond62
The trick is to know the name
Ain't dat de trouf bwana.
Your messageBox 'trick' is pure gold: Thanks.
Re: Search & Replace being a bit unhelpful
Posted: Wed Jan 12, 2022 1:26 pm
by richmond62
-
Change colours to suit your personal level of X£%VG&*