[Gambas-user] Global search & replace
Jussi Lahtinen
jussi.lahtinen at ...626...
Sat Apr 16 19:46:37 CEST 2011
> 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 mean (look also at attachment):
Public Sub btnReplaceAll_Click()
If InitSearch() Then Return
If chkCurrentFile.Value = True Then
If Message.Question(Subst$(("Are you sure you want to replace all
instances in this file of '&1' with '&2'?"), SearchString,
ReplaceString),("Yes"), ("No")) <> 1 Then Return
Run(GO_FORWARD + DO_REPLACE + DO_ALL)
Else
If Message.Question(Subst$(("Are you sure you want to replace all
instances of '&1' with '&2'?"), SearchString, ReplaceString),("Yes"),
("No")) <> 1 Then Return
Browse(chkSourceOnly.Value, True)
Endif
End
Just testing it for errors... not my best day for me to concentrate.
Jussi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: myversion.png
Type: image/png
Size: 33352 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20110416/62df03d5/attachment.png>
More information about the User
mailing list