News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

New Editor

Started by Biterider, March 04, 2025, 08:38:50 PM

Previous topic - Next topic

TimoVJL

Can't run it in Windows 7 x64
May the source be with you

Biterider

Hi Timo
What is the problem you are seeing running it on Win7? 

Biterider

jj2007

Quote from: Biterider on April 09, 2025, 07:27:42 AMAs for the SEH protection, I only added a Structured Exception Handling frame to a few critical code paths to prevent total loss in case of a crash.

So what happens if user has coded some kBytes and suddenly the electricity goes off? Or he gets a BSOD, etc? When simulating a crash by killing ADE.exe from Task Manager, the edits are apparently lost.

With RichMasm what happens is that on next launch user will be asked "You may have had a crash. Use last saved version?"

Actually, it's not the last saved version. It is what was on the screen before it crashed. RichMasm does nothing if you type like a madman, but if you stop typing for more than 5 seconds, it saves a mylastsource.tmp file.  When you save and exit, the tmp file gets deleted.

Now when you restart RichMasm, and it finds mylastsource.tmp in the folder of that source, it recognises that there was a crash and offers to restore the latest version.

I rarely see crashes, but in some cases (forced logoff...) this little feature saved me ;-)

TimoVJL

Quote from: Biterider on April 09, 2025, 04:36:12 PMHi Timo
What is the problem you are seeing running it on Win7?

Biterider
AMD CPU



May the source be with you

Biterider

Hi Timo
These screenshots helped a lot. The problem seems to be that the CPU or this particular version of Win7 does not support AVX instructions. Win7 starting with SP1 does support them, but I think the problem is the old CPU.

I can step down with the supported instruction set and only use e.g. SSE/SSE2.

Biterider

Biterider

Hi Timo
Here is the same version as in the first post, but without AVX or SSE support, which is not a big deal for this application. I hope it works for you now.

Biterider

TimoVJL

Thanks, now it works.

Toolbar tooltips could be useful.
May the source be with you

Biterider

Hi JJ
Quote from: jj2007 on April 09, 2025, 05:03:28 PMbut if you stop typing for more than 5 seconds, it saves a mylastsource.tmp file.
This is certainly an interesting and good feature that can be added without much effort.

There are 2 messages for closing a session: WM_QUERYENDSESSION/WM_ENDSESSION
I have used the former in the past to trigger such data storage tasks.
Note: The editor does not do this yet

Biterider

Biterider

Hi Timo
Quote from: TimoVJL on April 09, 2025, 09:16:00 PMToolbar tooltips could be useful.
The code is there, but I do not have all the translations for the supported languages. I decided to leave that until I have all the code in place and know all the messages I need to display.

Biterider

Biterider

Hi
I have implemented a few more features:

  • WM_QUERYENDSESSION logic 
  • File->New now has the option to select the editor template 
  • Same functionality for the "New" toolbar button using a drop down button.
  • 3 editor templates: MASM, Resource & Plain Text. Each template has its own settings in the ini file 
  • Information in the status bar what the application thinks it is editing 
  • Tooltips for the toolbars 
  • Drag & Drop automatically detects the file content and selects the best template.

Update on the first post.

I think it is time to implement the Undo/Redo feature. ATM I have no good idea how to implement it. Has anyone done this before?

Regards, Biterider


jj2007

Quote from: Biterider on April 11, 2025, 06:43:34 AMI think it is time to implement the Undo/Redo feature

What do you mean? The RichEdit control does it automagically...

Biterider

Hi JJ
Im not using the RichEdit control. The editor is coded in pure asm!

Biterider

jj2007


TimoVJL

ADE open sqlite3.c in blink of eyes  :thumbsup:
sqlite3.c size was just 9 MB  :biggrin:
So great wiewer for big files  :thumbsup:
May the source be with you

ognil

QuoteI think it is time to implement the Undo/Redo feature.  ATM I have no good idea how to implement it. Has anyone done this before?...

I did it in a very special "my" way, but you will have to wait until I finish and publish my Template64 project for more details.

Quote"What do you mean? The RichEdit control does it automagically..."

You know very well that it is almost impossible to implement Do/Undo together with syntax highlighting. That is why your editor does not have syntax highlighting. :smiley:
"Not keeping emotions under control is another type of mental distortion."