Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:14 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 Anomoly

Author Message
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1114
Posted: 11:55pm 17 Oct 2018
Copy link to clipboard 
Print this post

Jim, one for you perhaps?

Running MMEdit, whenever I switch from the Monitor window back to the main Edit window, I invariably get a number of characters automatically inserted - usually spaces - whever the mouse cursor is when I click back in the Edit window.

It can be annoying as it can screw up code. I am aware of it now and always click on a blank line or at the end of a line and just get about half a dozen spaces added. It does not happen every time and if I am very carefull NOT to move the mouse when clicking back in the Edit window, the insert is not done.

No big deal but I wonder if this is a known issue.

I am running Win7 Pro and the latest MMEdit.

panky.

... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 01:13am 18 Oct 2018
Copy link to clipboard 
Print this post

  panky said  
No big deal but...
panky.

I would call it a very big deal.

It is not something that I can repeat here which will make it difficult to track down.

Normally, when you return to the edit window, you need two clicks to make it active (something that really annoys me but unable to do anything about).

The edit control is not easy to talk to with the language I am using so fixing some of these issues is in the too hard basket.

Can you try clicking in the titlebar first to bring the edit window to the front before clicking in the code.

Jim
VK7JH
MMedit
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1114
Posted: 03:27am 18 Oct 2018
Copy link to clipboard 
Print this post

Jim,

I think I have narrowed down what may be the cause. With the Monitor window open, if you move the mouse pointer back over to the Edit window, and being careful to ensure the mouse is not moving, one click will transfer control to the Edit window and a second click will then allow all the normal operations.

However, if the mouse cursor is moving, even slightly, when you do the first click back in the Edit window, MMEdit appears to interpret the mouse movement as a second click and then starts hightling text until the mouse button is released. If you then hit a character at all, it replaces the highlighted text which could be anywhere on the currently displayed screen.

Your workaround if the first click being on the top header works fine.

panky

... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 03:43am 18 Oct 2018
Copy link to clipboard 
Print this post

I have suffered from this all along, also resort to making sure I click an empty place first, I though at one time it depended on where I was in the Edit window compared to the File in MM.edit. I just make allowances for it but still get caught out now and then.

EDIT: I don't have the highlight problem, only the inserted spaces or TAB?
Edited by KeepIS 2018-10-19
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
plover

Guru

Joined: 18/04/2013
Location: Australia
Posts: 306
Posted: 12:49pm 18 Oct 2018
Copy link to clipboard 
Print this post

panky

When I read the first post, I hesitated and decided to have a look. Checking out when running an E28 on the port.

Do I understand correctly, for example you have a small program in MMEdit window, you transfer this to the mite and continue working in the 'Chat" window? Then if you go back and activate the MMEdit window some 'extras' show up?

I am running window 7 Pro, I have not yet found anything unusual, though I am not entirely sure either I am doing the same as you describe.
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 09:52pm 18 Oct 2018
Copy link to clipboard 
Print this post

There appears to be two issues here.
Highlighting text then it gets replaced with anything you type. That is standard behavior of any text editor.

The second issue is random (or possibly just spaces) getting added to the edit window as soon as you click back to it.

That is the one I cannot repeat here.
I do know it takes two clicks to get the edit window active again. That is something I tried to fix but without any success.
Do the random spaces appear when you come from another program or just fdirectly from the chat window?

Jim



VK7JH
MMedit
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1114
Posted: 11:06pm 18 Oct 2018
Copy link to clipboard 
Print this post

Hi Jim,

The effect occurs only when returning from the Chat Window to the Edit window.

It is related to mouse movement - if I click the mouse in the Edit window and BEFORE I release the mouse button, have moved the mouse at all, text is higlighted, exactly as it does during normal operation in the Edit window.

If the mouse is perfectly stationary, on first click, nothing happens and on second click, the cursor positioning indicator appears and the line is very lightly shaded - all perfectly normal operation.

As mentioned earlier, at least on my system (Win 7 Pro on an Asus laptop with standard wireless PS/2 mouse), when returning from Chat window to Edit window, on the first click of the mouse in the Edit window, if the mouse is moved before the mouse button is released, the behavior is exactly the same as highlighting text. That is, the mouse movement data is being interpretted as the second click and if the mouse button is still down while this occurs, this results in text being highlighted.

At least on my system, this can be shown explicitly as follows:-

From Chat window, move mouse pointer to Edit window, click AND HOLD the mouse button down then move the mouse, then release the mouse button. For me, this results in a region of highlighted text or in the case where the mouse was not over any existing text, extra spaces being inserted.

Hope this makes sense. As I said, I am aware of it now and make sure I only click in an area in the Edit window where there is no text thus all I normally get a a few added spaces to the end of the line or if I am carefull not to move the mouse, the second click is required as normal.

If it just me experiencing this then please don't waste too much time on the issue.

Cheers,
panky

... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 11:30pm 18 Oct 2018
Copy link to clipboard 
Print this post

  TassyJim said  
The second issue is random (or possibly just spaces) getting added to the edit window as soon as you click back to it.

That is the one I cannot repeat here.
I do know it takes two clicks to get the edit window active again. That is something I tried to fix but without any success.
Do the random spaces appear when you come from another program or just fdirectly from the chat window?

Jim




Hi Jim, only when returning from the chat window AND ONLY when you are in EDIT MODE in the chat window. Normally I'll make a few changes in the chat window, run the program and and if I'm happy, I'll Ctrl-C and type edit to view the changes, then I want to reflect those changes in the main editor, so when I click in the main editor, the second click inserts spaces where I cliicked.

NOTE: It does not do this every time, it appears when I actually make a change in the chat edit window with the cursor part way across the edited line, THEN when I click back to MM.Edit, the second click inserts spaces.

Sometimes though I click back I can end up with these spaces inserted somewhere in the code and it only shows up when I send the MM.Editor code to the Micro and run it, I'll then get an error for some type of unknown command or undeclared variable and sure enough there are spaces inserted in the line that caused the error.

I'm pretty much not fazed by it now, quite often I'm editing 100 K+ of code and I tend to notice it more then - but again, as long as I'm aware of it then it's no big deal.

This is a Windows 10 system, as are the laptop and various PC'c, all do the same thing so it has absolutely nothing to do with hardware and is completely confined to the MM.edit program.

I reckon this weird condition and finding the cause matches my Signature.

Mike.

Edited by KeepIS 2018-10-20
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 01:37am 19 Oct 2018
Copy link to clipboard 
Print this post

  KeepIS said   AND ONLY when you are in EDIT MODE in the chat window.

That is the clue I was looking for. I have now actually seen the problem. Only once and haven't found a way to produce it consistently but at least I have something to work with.

The VT100 mode is a graphics control while the normal chat ASCII mode is a text control so there are differences for me to investigate.

I still can't see how the keyboard buffer can get the extra characters in it.

Jim
VK7JH
MMedit
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 01:51am 19 Oct 2018
Copy link to clipboard 
Print this post

Would not sweat it thought as it's minor and there are simple ways around it.

Thanks

Mike.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1114
Posted: 03:06am 19 Oct 2018
Copy link to clipboard 
Print this post

Jim,

I still think it is mouse motion data being interpretted as a click. If you move from the Chat window to the Edit window and ensure the mouse is motionless between click and release the first time, everything works exactly as you have described it should.

It is ONLY, for me at least, if the mouse is in motion between click and release that the text gets highlighted and/or sometimes, extranious characters, almost always spaces, get inserted.

panky

... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
KeepIS

Guru

Joined: 13/10/2014
Location: Australia
Posts: 1882
Posted: 03:21am 19 Oct 2018
Copy link to clipboard 
Print this post

No nothing to do with the mouse (in my case) except for highlighting which is normal.

Move from the Chat window in Edit mode and click on a line in main MM.Editor program, nothing happens as it's the first click - now carefully pick the mouse up off the table and hold it in the air, the cursor has not moved and now CANNOT move, now left click with the mouse in the air - there can be NO movement - and again spaces or (a tab) are inserted into the line.
NANO Inverter: Full download - Only Hex Ver 8.1Ks
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 04:41am 19 Oct 2018
Copy link to clipboard 
Print this post

I think Mike is closest. Between you both, I have at least found a way to cause the problem and desire to fix it.

When you change active windows, in this case from the chat to the edit, Windows sends the mouse and keyboard data to the active window.
For some obscure reason, the mouse data is getting sent to the new active window but the keyboard stays behind on the old window.
The second click of the mouse gets the keyboard data going to the correct window.

I think there is an issue with the way Liberty Basic gets the keyboard data when in graphics mode.

With a better language, I could use an interrupt when the focus is changed and test a few things but Liberty Basic is too basic. I am stuck with polling which slows things down.

An hour in the garden has given me time to think up a few ideas to try.

Jim


VK7JH
MMedit
 
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1114
Posted: 05:44am 19 Oct 2018
Copy link to clipboard 
Print this post

Hey Jim, a curly one and I really appreciate the effort you have made to address this pretty obscure problem.

As further info, on my system, a cabled Microsoft USB mouse works flawlessly every time as long as the two mouse clicks are more than about half a second apart. Same with the touchpad on the laptop and in fact, the same with the wireless USB mouse.

Interestingly, I can not get the error to occur if I have a New program selected - it does appear regularly however when I have a 1200 + line program open. But again, if I make a distinct pause of half a second or so between the initial click in the edit window and the second click, all seems to work flawlessly.

I'm sorry if the info on the issue appears a bit vague - it almost appears to be some sort of internal timing issue between windows, your program, the mouse drivers, Uncle Tom Cobbly and all.

Please don't waste time tearing your hair out on my behalf - as Mike said, it's easy enough to work around once you know it's there.

Thanks again for a really great program - I use it every day!

Regards,
Doug.



... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
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