[SOLVED - BUT NOT SATISFACTORILY] Better search and replace dialog... lazarus / 6-IDE-CodeTools ---------------------------------------------------------------------- GypsyPrince · 2020-04-04 19:29 Would it be possible to get a better search and replace dialog in the next version of Lazarus. It doesn't need to be anywhere near as fancy as the one for MS Visual Studio.  But I would like the 'Find Next' and 'Replace Next' buttons that allow me to cycle through to each occurrence of a word - to let me decide whether I want to replace that occurrence or leave it alone. The point is... I would like for the dialog to remain open after I click 'Replace' and not close until I click a close button.  It is REALLY annoying to have to reopen the dialog for each occurrence I want to replace, and using the 'Replace All' function can often be dangerous. See attached file for example... ---------------------------------------------------------------------- JuhaManninen · 2020-04-04 19:41 Quote from: GypsyPrince on April 04, 2020, 09:29:38 pmWould it be possible to get a better search and replace dialog in the next version of Lazarus. It doesn't need to be anywhere near as fancy as the one for MS Visual Studio.  But I would like the 'Find Next' and 'Replace Next' buttons that allow me to cycle through to each occurrence of a word - to let me decide whether I want to replace that occurrence or leave it alone. The point is... I would like for the dialog to remain open after I click 'Replace' and not close until I click a close button.  It is REALLY annoying to have to reopen the dialog for each occurrence I want to replace, and using the 'Replace All' function can often be dangerous. You failed to notice the "Prompt on replace" checkbox. The dialog works as well as the one in MS Visual Studio although it is different. This is not a Visual Studio clone. ---------------------------------------------------------------------- Martin_fr · 2020-04-04 19:53 with the "prompt" option, you will be asked for each occurrence.  Though the prompt has its own dialog. There is also continue - usually F3. ---------------------------------------------------------------------- GypsyPrince · 2020-04-04 20:49 @Martin_fr Quote...with the "prompt" option, you will be asked for each occurrence. With "Prompt on replace" checked, it asks me only one time if I would like to replace the next instance. When I select yes, the dialog closes. I need it to not close until I tell it to close. @JuhaManninen QuoteThe dialog works as well as the one in MS Visual Studio... No, actually it doesn't for reasons stated above. It is very inefficient in its current design. ---------------------------------------------------------------------- eljo · 2020-04-04 20:53 Quote from: GypsyPrince on April 04, 2020, 10:49:40 pm@Martin_fr Quote...with the "prompt" option, you will be asked for each occurrence. With "Prompt on replace" checked, it asks me only one time if I would like to replace the next instance. When I select yes, the dialog closes. I need it to not close until I tell it to close. @JuhaManninen QuoteThe dialog works as well as the one in MS Visual Studio... No, actually it doesn't for reasons stated above. It is very inefficient in its current design. you need to select replace all with the prompt on replace checked. ---------------------------------------------------------------------- GypsyPrince · 2020-04-04 20:58 @eljo Quoteyou need to select replace all with the prompt on replace checked. Please re-read this from my original post. Quote...and using the 'Replace All' function can often be dangerous. Using 'Replace All' can prove very bad sometimes when I don't want a specific occurrence of the word to be replaced. ---------------------------------------------------------------------- eljo · 2020-04-04 20:59 Quote from: GypsyPrince on April 04, 2020, 10:58:04 pm@eljo Quoteyou need to select replace all with the prompt on replace checked. Please re-read this from my original post. Quote...and using the 'Replace All' function can often be dangerous. Using 'Replace All' can prove very bad sometimes when I don't want a specific occurrence of the word to be replaced. just try it. Its what you want. ---------------------------------------------------------------------- GypsyPrince · 2020-04-04 21:00 I have tried it. It's not what I want. ---------------------------------------------------------------------- eljo · 2020-04-04 21:01 Quote from: GypsyPrince on April 04, 2020, 11:00:32 pmI have tried it. It's not what I want. doesn't stop before every replace and asks for yes or no? ---------------------------------------------------------------------- GypsyPrince · 2020-04-04 21:02 No. It does not. It replaces all occurrences at once. ---------------------------------------------------------------------- eljo · 2020-04-04 21:03 Quote from: GypsyPrince on April 04, 2020, 11:02:45 pmNo. It does not. It replaces all occurrences at once. Then you do not have the prompt on replace checked. ---------------------------------------------------------------------- GypsyPrince · 2020-04-04 21:06 Nope... wrong answer. It is selected. ---------------------------------------------------------------------- JuhaManninen · 2020-04-04 21:29 Quote from: GypsyPrince on April 04, 2020, 11:02:45 pmNo. It does not. It replaces all occurrences at once. I don't believe you now. I just tested and it works as eljo described. It has done so for ages, it cannot be a version difference issue either. ---------------------------------------------------------------------- Martin_fr · 2020-04-04 21:30 Quote from: GypsyPrince on April 04, 2020, 11:00:32 pmI have tried it. It's not what I want. Then I do not know what you want. Your image on the first post has the following buttons - replace next - find next also (replace all, but I guess that is not what this is about?) So if you press: - Find next -> highlight the next occurrence   if a current occurrence is already highlighted, it is not replaced - Replace next -> replace the current occurrence, then highlight the next occurrence That is what in Lazarus "Replace all" + Prompt does: When you hit "Replace all", it will - find and highlight the next occurrence. - prompt you   - Yes => replace and find next (and prompt again)   - No => do not replace and find next (and prompt again) And thus it asks for every occurrence. Well, "replace next" sounds as if it could mean something difference. - First search for the next. - Then without prompt replace it. But that would make no sense? If I missed something, then please explain in more detail what you want. That is other than the optical diff, if the Yes/no are in the mains search window, or in their own window; or what the label on them is. ---------------------------------------------------------------------- Martin_fr · 2020-04-04 21:34 Quote from: GypsyPrince on April 04, 2020, 11:02:45 pmNo. It does not. It replaces all occurrences at once. Can you make a video of it? It has not happen to anyone I know. Unless you did at some point select "Yes to all" => that would mean to replace all the rest, with no further prompt. Point is, if we changed it all into one window, but keeping the existing code (which works for me, and all I know), then by all likelihood it still do the wrong thing for you. Because either there is a bug, or you hit the wrong button (or wrong key) ---------------------------------------------------------------------- eljo · 2020-04-04 21:47 Quote from: GypsyPrince on April 04, 2020, 11:06:57 pmNope... wrong answer. It is selected. Nope you did it wrong. https://gifyu.com/image/dJ1X Edit   changed image service the old one did not play the gif animation. ---------------------------------------------------------------------- GypsyPrince · 2020-04-04 22:44 I see what the problem is. Others like me whose native language is English have noticed that while the application and documentation are in English, it is not the dialect of English spoken by people who speak native English. In other words, the English used in the application and documentation does not make sense to Americans and British - because it is a different English. To a person who is American or British, the phrase "Replace All" means to replace all of the words at once. The way the process works in that video, the button should instead be labeled "Replace Next" or "Replace On at a Time". Others from America and England I have messaged with in here have had the some concerns. ---------------------------------------------------------------------- eljo · 2020-04-04 22:47 Quote from: GypsyPrince on April 05, 2020, 12:44:04 amOkay. I can tell this is a dead end-street so I'm just going to drop the issue. Have you managed to see the behavior I'm showing on the gif in my previous post? If not then something is wrong and you better find what. As for the better dialog I don't mind it I'll even test any dialog you come up with if that helps but I do not see my self writing one. ---------------------------------------------------------------------- GypsyPrince · 2020-04-04 23:11 Okay. Thanks to your video I can do what I was asking for. However, there is a problem with incorrect English on the control captions and documentation. What is written in the documentation and captions often means something else to people who speak native English.  So, it is difficult to learn this application. ---------------------------------------------------------------------- eljo · 2020-04-04 23:25 Quote from: GypsyPrince on April 05, 2020, 01:11:48 amOkay. Thanks to your video I can do what I was asking for. Glad I could help. Quote from: GypsyPrince link=topic=49195.msg355836#msg355836 However, there is a problem with incorrect English on the control captions and documentation. What is written in the documentation and captions often means something else to people who speak native English.  So, it is difficult to learn this application. That specific terminology comes from turbo pascal and it was introduced by Borland an American company. So I would guess it is 100% "Native English" speaking. A bit out of time? probably. A bit outside the norms set by microsoft? Certainly. But native english non the less. In any case any and all suggestion for a better terminology is always welcomed (I think) just make sure you use the proper communication channel, which I have no idea what might be, someone from the team should inform you about that. ---------------------------------------------------------------------- dsiders · 2020-04-04 23:33 Quote from: GypsyPrince on April 05, 2020, 12:44:04 amI see what the problem is. Others like me whose native language is English have noticed that while the application and documentation are in English, it is not the dialect of English spoken by people who speak native English. In other words, the English used in the application and documentation does not make sense to Americans and British - because it is a different English. To a person who is American or British, the phrase "Replace All" means to replace all of the words at once. The way the process works in that video, the button should instead be labeled "Replace Next" or "Replace On at a Time". Others from America and England I have messaged with in here have had the some concerns. Well, the docs are open source too. You seem to be of the opinion that you're qualified for the task. So, if you can climb down off your high horse long enough... have at it. ---------------------------------------------------------------------- GypsyPrince · 2020-04-04 23:56 Well, since so many basement dwellers in this forum want to act like juvenile dick heads rather than address a question in an adult-like manner, I don't believe this trashy place is for me. QuoteSo, if you can climb down off your high horse long enough... have at it. ---------------------------------------------------------------------- JuhaManninen · 2020-04-05 08:04 Quote from: eljo on April 05, 2020, 01:25:41 amIn any case any and all suggestion for a better terminology is always welcomed (I think) just make sure you use the proper communication channel, which I have no idea what might be, someone from the team should inform you about that. Patches for both code (including GUI resourcestrings) and documentation usually go through the bug tracker. The mailing list is good for asking specific questions and discussing details as most developers read it. ---------------------------------------------------------------------- Martin_fr · 2020-04-05 10:28 Quote from: GypsyPrince on April 05, 2020, 01:11:48 amHowever, there is a problem with incorrect English on the control captions and documentation. I just checked: LibreOffice has the same "Replace All". And I am sure I have seen that in other apps... It is the commonly used term. Especially in the old days, when all apps used to have a separate prompt dialog.