Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:12 01 Aug 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MMedit bug in Search

Author Message
MikeO
Senior Member

Joined: 11/09/2011
Location: Australia
Posts: 275
Posted: 06:22am 22 Jan 2018
Copy link to clipboard 
Print this post

Well more like an annoyance , you can stop it when you are aware.

For ages now when searching I would press find scanning through the program for the line I wanted without realising until the program stopped with an error that I Had introduce the error when searching. It depends what you are searching for but here is the classic TRAP I have on occasions caused for myself.

See in the snippet below I was searching for "off" , I had pressed find and search had found off in the variable off% but had put some "spaces" in the text. How you ask? well I have a habit of typing the text in the search window and sometimes without a further thought I press "Enter" , if you do that and do a search when it finds the text after pressing "Find" it will introduce those spaces all on its own. If it wasn't the line you were looking for you can go blindly on and not realise until it crashes with an error as in the case below with spaces in the variable.

Simple answer , Yes i know don't press enter when I didn't need to but like my wife says about problems she finds in the data base application I wrote, why didn't you stop it doing that? even when I say , that's operator error!

Sorry Jim! I can live with it but others may not have realised where that program error came from and that they caused it.

Cheers Mike, Great Great Great program by the way! I cannot manage without it..




Codenquilts
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 07:31am 22 Jan 2018
Copy link to clipboard 
Print this post

There a few strange things with the Find command.

Originally, I kept the focus on the "Find" window which made repeat finds etc easy to control.

Some users wanted to edit at the 'found' location and then continue with the 'finding' after editing. This means focus has to return to the main window (with the 'find' target highlighted)
When you pres enter or any other key, the edit window does as instructed and replaces the highlighted text with whatever you typed.

Your problem is a bit different.
I am not sure why it puts in spaces when you do as you are doing. I did a few tests and I cannot see the extra spaces anywhere in my side of the code. I will blame the Scintilla gadget that does the actual editing.

Jim



VK7JH
MMedit
 
MikeO
Senior Member

Joined: 11/09/2011
Location: Australia
Posts: 275
Posted: 07:45am 22 Jan 2018
Copy link to clipboard 
Print this post

I thought the Find again didn't exhibit the problem BUT I have found it does. I will just keep my finger away from the Enter Key I think.

Thanks Mike.
Codenquilts
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 871
Posted: 07:55pm 22 Jan 2018
Copy link to clipboard 
Print this post

Jim - Fantastic software! Something I use "every day" and "couldn't be without"!
Mike is right that it is an annoyance that one needs to adapt to. It took me a while to realise what was causing weird spaces to occur in my code - my own silly fault for too quickly hitting <Enter> instead of clicking on "Find".
I typically have two sessions of MMEdit running (base station and remote s/w), plus two sessions of chat, plus a session of Notepad++. If I get on a roll it is SO easy to lose track of what I am editing. Hitting <Enter> at the wrong time causes no end of fun.

Keep up the good work.

Andrew
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 04:02am 24 Jan 2018
Copy link to clipboard 
Print this post

I couldn't work out why the extra spaces were being inserted so I decided to intercept the CR that was causing the problem.

Now you can type in a search phrase and hit return which will act the same as pressing the find button.
The cursor doesn't have to be at the end of the search phrase so if there is an existing phrase in the box when you open the search dialog, enter will work.

Note that if you press return again while you are in the editor, you will not be happy.

I haven't done anything with the 'replace' box. That is too dangerous to try anything clever.

I haven't done much testing so use at your own risk and please report your opinions.

2018-01-24_140155_MMedit.zip
Extract the TKN file and place it in the program folder.

Jim

VK7JH
MMedit
 
MikeO
Senior Member

Joined: 11/09/2011
Location: Australia
Posts: 275
Posted: 08:29am 24 Jan 2018
Copy link to clipboard 
Print this post

Thanks Jim, I will try and report back. Mike
Codenquilts
 
MikeO
Senior Member

Joined: 11/09/2011
Location: Australia
Posts: 275
Posted: 11:13pm 24 Jan 2018
Copy link to clipboard 
Print this post

Terrific Jim that nailed it! Even I don't press Enter twice BUT even if I do Ctrl Z fixes it.

Thanks again.

Codenquilts
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 871
Posted: 11:55pm 25 Jan 2018
Copy link to clipboard 
Print this post

Hi Jim - fantastic (as usual)! Thanks,

Andrew
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025