Re: [Gambas-user] Global search & replace

2011-04-16 Thread Jussi Lahtinen
Yes, good job! Now it's clear and logical. Jussi 2011/4/17 Benoît Minisini > > > You mean "in current file", not "in current directory", do you? > > > > Oh, yes.. a lot of errors from me... > > > > > And yes, it is logical to replace all only in the current file. Think > > > about renaming a p

Re: [Gambas-user] Global search & replace

2011-04-16 Thread Benoît Minisini
> > You mean "in current file", not "in current directory", do you? > > Oh, yes.. a lot of errors from me... > > > And yes, it is logical to replace all only in the current file. Think > > about renaming a private class variable, for example. > > I think you misunderstand what I meant... > This

Re: [Gambas-user] Global search & replace

2011-04-16 Thread Jussi Lahtinen
> You mean "in current file", not "in current directory", do you? > Oh, yes.. a lot of errors from me... > And yes, it is logical to replace all only in the current file. Think about > renaming a private class variable, for example. > I think you misunderstand what I meant... This is what I me

Re: [Gambas-user] Global search & replace

2011-04-16 Thread Benoît Minisini
> Hmmm... that's not good, my error... it will be asked also when you use > browse feature! > And I'm not sure it is very logical to have "Replace", "Replace all" and > "Browse and replace"... > "Replace all" should replace all, not just in current directory. > > Jussi > You mean "in current fil

Re: [Gambas-user] Global search & replace

2011-04-16 Thread Jussi Lahtinen
"intances", should be "instances"... sometimes hard to get it right Jussi On Sat, Apr 16, 2011 at 20:12, Jussi Lahtinen wrote: > Public Sub btnBrowseReplace_Click() > > If InitSearch() Then Return > > > If Message.Question(Subst$(("Are you sure you want to replace all > intances of '&1'

Re: [Gambas-user] Global search & replace

2011-04-16 Thread Jussi Lahtinen
Public Sub btnBrowseReplace_Click() If InitSearch() Then Return If Message.Question(Subst$(("Are you sure you want to replace all intances of '&1' with '&2'?"), SearchString, ReplaceString), ("Yes"), ("No")) <> 1 Then Return Browse(chkSourceOnly.Value, True) End Jussi On Sat, Apr 16,

Re: [Gambas-user] Global search & replace

2011-04-16 Thread Jussi Lahtinen
Hmmm... that's not good, my error... it will be asked also when you use browse feature! And I'm not sure it is very logical to have "Replace", "Replace all" and "Browse and replace"... "Replace all" should replace all, not just in current directory. Jussi On Sat, Apr 16, 2011 at 19:45, Jussi Lah

Re: [Gambas-user] Global search & replace

2011-04-16 Thread Jussi Lahtinen
It's good now, but I would like to see confirmation question, in case of accidental click on wrong button. My suggested code to FSearch: Private Sub Browse(Optional bOnlySource As Boolean, Optional bReplace As Boolean) Dim sDir As String Dim sFile As String Dim sPath As String Dim iPos As

Re: [Gambas-user] Global search & replace

2011-04-14 Thread Benoît Minisini
> On Tuesday 12 April 2011 20:41:20 Benoît Minisini wrote: > > > On Sunday 10 April 2011 22:17:20 Olivier Cruilles wrote: > > > Thanks, I'll try that, but I would have thought the gambas editor > > > should accomodate global replaces. > > > > > > Regards > > > > > > Richard > > > > Global replac

Re: [Gambas-user] Global search & replace

2011-04-12 Thread richard terry
On Tuesday 12 April 2011 20:41:20 Benoît Minisini wrote: > > On Sunday 10 April 2011 22:17:20 Olivier Cruilles wrote: > > Thanks, I'll try that, but I would have thought the gambas editor should > > accomodate global replaces. > > > > Regards > > > > Richard > > Global replace was added in revisio

Re: [Gambas-user] Global search & replace

2011-04-12 Thread richard terry
On Tuesday 12 April 2011 20:41:20 Benoît Minisini wrote: > > On Sunday 10 April 2011 22:17:20 Olivier Cruilles wrote: > > Thanks, I'll try that, but I would have thought the gambas editor should > > accomodate global replaces. > > > > Regards > > > > Richard > > Global replace was added in revisio

Re: [Gambas-user] Global search & replace

2011-04-12 Thread Benoît Minisini
> On Sunday 10 April 2011 22:17:20 Olivier Cruilles wrote: > Thanks, I'll try that, but I would have thought the gambas editor should > accomodate global replaces. > > Regards > > Richard > Global replace was added in revision #3753. To activate it, you must check the "Replace all" entry in th

Re: [Gambas-user] Global search & replace

2011-04-10 Thread richard terry
On Sunday 10 April 2011 22:17:20 Olivier Cruilles wrote: Thanks, I'll try that, but I would have thought the gambas editor should accomodate global replaces. Regards Richard > Hi, > > You can use 'sed' unix command > > sed -i 's// file> > > in Gambas > > SHELL "sed -i 's/text_to_search/tex

Re: [Gambas-user] Global search & replace

2011-04-10 Thread Olivier Cruilles
Hi, You can use 'sed' unix command sed -i 's// in Gambas SHELL "sed -i 's/text_to_search/text_to_replace/g' file_example.txt" WAIT The -i option replace directly all instances founded in the file and the /g at the end indicate that you want to replace all instances and not only the first one

[Gambas-user] Global search & replace

2011-04-10 Thread richard terry
I'm missing something here, as I can see no way to do a global search and replace of a string across all files in the project. Maybe someone can help?? Regards Richard -- Xperia(TM) PLAY It's a major breakthrough. An a