PLEASE fix find&replace
Moderator: Klaus
PLEASE fix find&replace
When I want to find some code in my project in all tabs opened in script editor and replace it, LiveCode crashes... Problem is not in finding code - when I want to replace all, then it just keep 'replacing', but actually nothing happens (and I was waiting long time...).
I have about 100 buttons in my stack and i cant replace same code in all buttons at once. If i do this manually, this would take me about 10 hours...
Please fix this annoying bug! Thanks!!
			
			
									
									
						I have about 100 buttons in my stack and i cant replace same code in all buttons at once. If i do this manually, this would take me about 10 hours...
Please fix this annoying bug! Thanks!!
- 
				andrewferguson
 - VIP Livecode Opensource Backer

 - Posts: 184
 - Joined: Wed Apr 10, 2013 5:09 pm
 
Re: PLEASE fix find&replace
Hello,
It seems like you have found a nasty bug.
All bug reports should be reported to http://quality.runrev.com/.
Andrew
			
			
									
									
						It seems like you have found a nasty bug.
All bug reports should be reported to http://quality.runrev.com/.
Andrew
Re: PLEASE fix find&replace
Hi croivo,
If you have a 100 buttons that have the same code in them you should be using a behavior.
Doesn't have to be the full code of the button it could just be part;
on mouseEnter
set cursor to "hand"
etc.
If that was in each of your buttons you could just have a single button who's behavior all the other buttons could copy. That way you only have to change 1 button to change them all.
Make sense?
Simon
			
			
									
									If you have a 100 buttons that have the same code in them you should be using a behavior.
Doesn't have to be the full code of the button it could just be part;
on mouseEnter
set cursor to "hand"
etc.
If that was in each of your buttons you could just have a single button who's behavior all the other buttons could copy. That way you only have to change 1 button to change them all.
Make sense?
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
						Re: PLEASE fix find&replace
Code is not exactly the same... Very similar...Simon wrote:Hi croivo,
If you have a 100 buttons that have the same code in them you should be using a behavior.
Doesn't have to be the full code of the button it could just be part;
on mouseEnter
set cursor to "hand"
etc.
If that was in each of your buttons you could just have a single button who's behavior all the other buttons could copy. That way you only have to change 1 button to change them all.
Make sense?
Simon
Re: PLEASE fix find&replace
HI croivo,
just do it yourself
 
Create a button with a script like this:
Won't take 10 hours 
 
Best
Klaus
			
			
									
									
						just do it yourself
Create a button with a script like this:
Code: Select all
on mouseup
  repeat with i = 1 to 100
    put the script of btn i into tScript
    replace "This string" with "That string" in tScript
    set the script of btn i to tScript
  end repeat
end mouseupBest
Klaus
Re: PLEASE fix find&replace
All this clever stuff begs the issue of why LC crashes under the load. If you can send a stack that reliably does this, the RR team would love to see it.
Craig Newman
			
			
									
									
						Craig Newman
Re: PLEASE fix find&replace
It does? Sorry, the script was out of my head, never tested it.dunbarx wrote:All this clever stuff begs the issue of why LC crashes under the load.
Does what? Work or crash reliably?dunbarx wrote:If you can send a stack that reliably does this, the RR team would love to see it.