News:

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

Main Menu

Simple editor - betatesters please

Started by jj2007, March 06, 2024, 01:49:54 AM

Previous topic - Next topic

sinsi

Open File dialog
 - click on a column header to sort, there is a noticeable delay
 - click on a filename, then change to another folder, get asked whether I want to create the file
    (this only happened the first time)
 - filename is already selected no matter which folder I go to

Edit
 - When I do open a file the window is blank, ctrl-A shows the text is there.
   OK, upon investigation of the ini file I found the culprit
    bgcolRtf=000FFFFFFh
    fgCol=000FFFFFFh
    bgCol=000FFFFFFh
   You've been Procol Harum'd  :biggrin:
 - each key counts as an edit? If I type a 4-letter word then ctrl-Z four times and exit, it asks me if I want
   to save my 8 changes.

Build
 - why do the buttons have a red cross?
 - do I have to click the button and then a menuitem? Or is that only Build Batch?
 - click Build Windows, nothing for a few seconds then a console window shows with the missing uasm message

🍺🍺🍺

jj2007

Quote from: NoCforMe on March 06, 2024, 08:24:37 AMo The files shown in this dialog weren't sorted, making it hard to find the file you want.

They are sorted by date, most recent files on top. This is by design.

Quote from: sinsi on March 06, 2024, 08:48:10 AMOpen File dialog
 - click on a column header to sort, there is a noticeable delay
 - click on a filename, then change to another folder, get asked whether I want to create the file
    (this only happened the first time)
 - filename is already selected no matter which folder I go to

It's a standard dialog, so the delay is not the program's fault, I guess. Thanks for the feedback, I'll try to find out whether there is a logical fault.

Quote- When I do open a file the window is blank, ctrl-A shows the text is there.
  OK, upon investigation of the ini file I found the culprit
    bgcolRtf=000FFFFFFh
    fgCol=000FFFFFFh
    bgCol=000FFFFFFh
  You've been Procol Harum'd  :biggrin:

Yes, I had the same experience; will be fixed asap :sad:

Quote- each key counts as an edit? If I type a 4-letter word then ctrl-Z four times and exit, it asks me if I want to save my 8 changes.

That's the current design. I might try to lower the edit count when getting a WM_UNDO message, but I have a suspicion that this might fail. RichEd, y'know...

The next version will check if the current text is shorter than the original text, and if it's below 90%, you'll get a warning "below 90% - do you really want to save", yesnocancel. This is a feature that saved me many times with RichMasm :cool:

QuoteBuild
 - why do the buttons have a red cross?
 - do I have to click the button and then a menuitem? Or is that only Build Batch?
 - click Build Windows, nothing for a few seconds then a console window shows with the missing uasm message

No red cross here - what exactly do you see where? :rolleyes:

The C and W buttons do what their tooltip says. You need to click them, but hitting F6 will also work.

The B button is special: when you click it, you get a popup menu with a list of the batch files present in the exe's folder.

Check buildSE.bat:
  @echo off
  REM #Desc=Default Windows or Console build
  chcp 65001
  ...

If the #Desc= string is present, you will see the description instead of the filename in the B button's popup menu.

There is another problem that I need to solve: if the batch file has a pause, SimpleEditor will hang until you switch to the batch window and hit a key. I might use a thread for building, but will have to check the consequences.

NoCforMe

Quote from: jj2007 on March 06, 2024, 11:17:06 AM
Quote from: NoCforMe on March 06, 2024, 08:24:37 AMo The files shown in this dialog weren't sorted, making it hard to find the file you want.
They are sorted by date, most recent files on top. This is by design.
OK, your preference, definitely not mine. Is there a "sort by" option, or do you plan on including one?
Assembly language programming should be fun. That's why I do it.

jj2007

Quote from: NoCforMe on March 06, 2024, 11:57:39 AMOK, your preference, definitely not mine. Is there a "sort by" option, or do you plan on including one?

Congrats that you are able to reliably spot the latest version from an alphabetical listing - I am too old for that.

Yes, there is a "sort by" option: just click into the header of the first column :thumbsup:

NoCforMe

Quote from: jj2007 on March 06, 2024, 12:02:52 PM
Quote from: NoCforMe on March 06, 2024, 11:57:39 AMOK, your preference, definitely not mine. Is there a "sort by" option, or do you plan on including one?
Congrats that you are able to reliably spot the latest version from an alphabetical listing - I am too old for that.
Yes, there is a "sort by" option: just click into the header of the first column :thumbsup:
Well, I'm too old for that too. And no, I can't "reliably spot the latest version" either. But that's not the way I work; I don't have multiple versions of files that differ alphabetically. Apparently you do; not saying my way is better, just that we have different ways of working.

All of which is to say that it might not be a good idea to assume that other people work the same way you do. Which is why it's nice to have options, like being able to sort a file list differently. BTW, is that sort option saved? or would you have to reset it every time you use your editor?
Assembly language programming should be fun. That's why I do it.

sinsi

On a 4K monitor the program starts off taking up most of the screen, if it's run by itself it shows the open dialog, which is even bigger. No drama, but cancelling the dialog makes the main program snap and shrink to 1/4 size. A bit jarring on the eyes  :biggrin:

One red cross for sir

🍺🍺🍺

jj2007

Quote from: sinsi on March 06, 2024, 01:06:57 PMOn a 4K monitor the program starts off taking up most of the screen

4k is luxury :biggrin:

SimpleEditor should ideally save its size and position once you close it. Does that work?

QuoteOne red cross for sir

One blue circle for you - Windows at its best :badgrin:

This is Win10 - what's your version?

jj2007

Version 4 attached to top post.

- colours are ok now
- dragging files from Explorer (or similar) on SE window works
- save edits logic improved
- search box has the focus on opening; hit Return, then use cursor down to scroll through the matches
- you can now edit SimpleEditor.ini in SE itself (before, you could save the ini file but it got immediately overwritten by SaveSettings...)
- editor warns if user tries to save a doc that is smaller than the original:
MsgBox hGui, Str$("Only %i% of initial text.\nSave nonetheless?", eax) , "Hi", MB_YESNOCANCEL or MB_DEFBUTTON3

jj2007

Version 5 - see top post :cool:

Inter alia, some of the Masm64 SDK examples (e.g. \Masm64\Examples\Simple\controls\controls.asm) should now work "out of the box" with the B button. Let me know if it doesn't, please :thup:

It's not yet ready for a release version, but so far it works fine. Thanks for all your suggestions :thup:

SimpleEditor.ini:
QuoteWinZoomed=0
WinRect=485/0/1286/665
Zoom=110

ofSort=2
bgcolRtf=0FFFFFFh
fgCol=0FFFFFFh
bgCol=0
font=Lucida Console

Language=4

Red settings get adjusted whenever you close the program; blue settings can be edited using SimpleEditor.exe

For example, ofSort=0 means OpenFile gets sorted alphabetically. Default is ofSort=2, most recent files on top.

jj2007

The discussion has moved to A simple editor for the Masm32 and Masm64 SDKs and the UAsm/JWasm WinInc package

The source is currently at 435 lines, plus resources. If anybody is seriously interested to see it, please PM me. Building requires MasmBasic of 9 March.

jj2007

#25
Release version 1 is online - please test and give me feedback :thup:

Recent changes:

- six batch files for console/Windows for 1. Masm32, 2. Masm64 SDK and 3. UAsm+WinInc
- colours revisited, should be ok now
- dragging files from Explorer (or similar) on SimpleEditor window works
- save edits logic improved
- on load, search box has the focus (hit Return, then use cursor down to scroll through the matches)
- content of search box will be remembered on next launch
- you can edit SimpleEditor.ini in SE itself (mainly colours)
- editor warns if user tries to save a doc smaller than the original
- in case of crashes, editor will offer to recover the latest version (one open file will be remembered; think carefully before saving the recovery file!)
- File save as offers more formats (asc/rtf, plain test asm, Utf8 asm, Utf16 rc, ...)
- you may test File save as with the MasmBasic sample in Res\MiniGui.asc

The source is now at 415 lines.

greenozon

Quote from: jj2007 on March 14, 2024, 06:24:23 AMRelease version 0 is will soon be online - please test and give me feedback :thup:

pardon me but where is the download link for the editor itself... can't find it... sorry

jj2007

Quote from: greenozon on March 14, 2024, 08:18:25 AMwhere is the download link for the editor itself

I made major changes and ran into a problem, which I am trying to solve in the next hours...

jj2007


sinsi

File menu opens when the mouse is anywhere from the leff edge to the letter U in the Language menu.
Language menu opens anywhere from the U to 1/4 the way over the New document button
Toolbar - does anyone actually use one? I cringe whenever I see someone typing in a document then grab the mouse and click (e.g. the next control rather than TAB). Hotkeys please.
Options? How do I set up assembler, linker etc?

More to come ☢️
🍺🍺🍺