Hello all,
Is there a way to replace all matching text with new text - but only in an area highlighted?
Thanks,
Tim
Hello all,
Is there a way to replace all matching text with new text - but only in an area highlighted?
Thanks,
Tim
Something like tfField.selText = tfField.selText.replaceAll("find", "replace")
should work.
Hi guys,
I guess I was not very clear. I meant using the IDE tools. Select a portion of code where one part of it needs to be changed.
For example, I copy/paste code from one place to another, but need to edit that block of code somehow. If I use the IDE, I cannot find a way to only do the part that has been highlighted.
Tim
[quote=282163:@Tim Seyfarth]I guess I was not very clear. I meant using the IDE tools. Select a portion of code where one part of it needs to be changed.
[/quote]
Ah. No, I think the minimum is the method/event you are within. However, you can copy the selection to a text editor, do the find/replace there, and just paste it back. I do that sometimes (my text editor has more powerful find/replace).
You can also do the search (limited to the method) and in the listed matches select just the ones in the selection area and hit the “Replace #” button.
[quote=282163:@Tim Seyfarth]I guess I was not very clear. I meant using the IDE tools. Select a portion of code where one part of it needs to be changed.
[/quote]
REALStudio had that… unfortunately that feature did not make it into Xojo… and I find myself missing it more and more.
In that case, I copy the code (hightlighted code) and paste it in a word processor then Ive made the search/replace there.
Remember: I feel insecure using Xojo Code Editor (Xojo IDE ) I have to work slowly to not be surprised by what happens [I may start a contest: how many times a Xojo IDE working session do I say what happends ?]