News:

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

Main Menu

Editor for testing.

Started by hutch--, December 04, 2016, 06:12:29 PM

Previous topic - Next topic

hutch--

Could I impose on some of our members to run some simple tests on this editor. What I am aiming at is a base editor that does the basic stuff like loading and saving files, search and replace and with the correct confirmation for load and save operations. The target is a template generator so that a base editor can be written as a project quickly that saves you from having to do the hacky stuff so you can write your own custom versions of a rich text editor.

I have added the search and replace dialogs and code and seem to have the file IO confirmations done so they work OK. Since I have worked on it on and off for the last weeks or so, its possible that I may have missed something in terms of reliability, even though its test up OK at the moment.

jj2007

Seems to work fine on Win7-64, Hutch. A lot of pretty basic things are missing, though, such as a filter for txt, doc, asm, inc in the file open dialog. Or a recent files list :P

MichaelW

It seems to work fine on my Windows 10 notebook, but with a 15.6" screen at its native resolution of 1366x768, your font selection, and white characters on a dark background, the characters are not easy for me to read. I do better with black characters on a white background.



Well Microsoft, here's another nice mess you've gotten us into.

hutch--

Thanks Michael and JJ, both colours are adjustable with a single COLORREF value. As far as file filters on open and save, its only a single line of code to change that and that is better left to the person doing the tweak. MRU lists are fine on a single instance application but close enough to impossible with a multi-instance tool. You would have to have a separate list display to try and keep track of them and with multiple instances it could become long and messy.

jj2007

Quote from: hutch-- on December 05, 2016, 02:12:19 PMMRU lists are fine on a single instance application but close enough to impossible with a multi-instance tool. You would have to have a separate list display to try and keep track of them and with multiple instances it could become long and messy.

RichMasm writes the file list to disk whenever user changes a word in the current doc. When looking at the MRU, any RichMasm instance picks the list from disk and rebuilds the menu. Works 100% flawlessly.

hutch--

If I was going to implement this in a multi-instance editor it would be a separate list that is added from the top after removing duplicates so that you did not have multiple copies of the same file name. Now the problem is it would end up being a very long list just through the normal rate of opening and closing files so you would have to create a cut off list length. The next thing would be that the list would have to be updated live over every open instance of the editor.

I can be done but there is no way I would write a mess like this. When I have the template finished so it can be routinely used, anyone who wants to make a mess like this is welcome to do what they like but there is no way I would touch it with a barge pole. I am reasonably happy with an editor that opens, creates and saves files with the correct confirmation and the search and replace working as it saves messy coding on a repeat basis. I still have some of the hot keys to menu items to do on it and a few tweaks here and there but its close to what I want as the end result. The font is currently set at Fixedsys so I should add an option to change it, "Consolas" reads and looks OK and is scalable so having the option of setting different fonts available in the source code makes sense.

It has all of the adjustments needed to change the toolbar sizes (once you supply a new image strip) so it can be made to look like whatever the author wants.

jj2007

#6
Quote from: hutch-- on December 05, 2016, 11:19:26 PM
If I was going to implement this in a multi-instance editor it would be a separate list that is added from the top after removing duplicates so that you did not have multiple copies of the same file name. Now the problem is it would end up being a very long list just through the normal rate of opening and closing files so you would have to create a cut off list length. The next thing would be that the list would have to be updated live over every open instance of the editor.

Exactly :t

I have been using that system on a daily basis for a decade now, and it works perfectly - latest version always on top, no risk of opening an obsolete version, etc ;-)

Quotea very long list just through the normal rate of opening and closing files
I adjust the list only if the user edits the source. So just opening a file to have a look won't update the MRU.

Below a screenshot. The extra info on time stamps is added only if user holds Shift while hovering over the file menu.

avcaballero

It works fine here, W7-64bits

ragdog

Works good i cannot found bugs. :t

hutch--

Thanks guys, the testing is very useful.  :t