News:

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

Main Menu

QEditor plugin: most recently used files

Started by jj2007, December 29, 2022, 11:08:55 AM

Previous topic - Next topic

zedd151

open instance #1, open and save a file with another name okay, and editor#1 remains open. Not closing it at this time.
open instance #2, open and save a file with another name okay.
immediatley closing both editor windows in rapid succession, the saved file from instance #2 did not get written to file.

Unsure if that is how it happened the first time.. will continue to investigate.

zedd151

No further issues at this time.  :biggrin:   Without any 'window closing acrobatics' (closing all instances in rapid succession after saving a file) I cannot find any other issues.
My debugging here is done. I will send you a PM with the bank account # in the Caymans where you can send my generous fee.  :tongue: 


All in all, Well Done!  :thumbsup: 
Except for the modified "Open File" filter. (hutch is going to kill you this time)  :badgrin:

All that remains is to get qeditors main window to stay where it is supposed to be. i.e., where it was before opening the MRU plugin.  :azn:

jj2007

Quote from: zedd151 on December 30, 2022, 08:32:28 AM
All in all, Well Done!  :thumbsup: 

Thanks :thup:

QuoteExcept for the modified "Open File" filter. (hutch is going to kill you this time)  :badgrin:

:mrgreen:

hutch--

 :biggrin:

      case WM_REFRESHMENUS
        call reload_menu

Like this from a plugin DLL.

    invoke PostMessage,HWND_BROADCAST,WM_REFRESHMENUS,0,0

just note that I do not support the use of a MRU list. QE is a multi-instance editor.

You could also try directly calling "reload_menu" with no arguments.

zedd151

Quote from: jj2007 on December 30, 2022, 05:58:10 AM
Quote from: hutch-- on December 30, 2022, 04:13:26 AMGet a later version of QE, that one with the blue interface is very old.


I've tested the plugin with both of them. Is there any significant difference under the hood?

Word selection when qeditor is run under windows 10... http://masm32.com/board/index.php?topic=8004.0
I use windows 7. :tongue:   ... usually ...  :cool:

hutch--

Z,

QE will run on 32 bit XP, it was written in 2008 so OS versions don't matter much. I had to tweak a few things when 64 bit Windows was introduced but it was no big deal. The history of tweaks on QE would be bigger than the source code.

If you wanted an editor with a MRU list, you would do it with the recent 64 bit version as its cplugin.dll loads at startup.

zedd151

#51
Quote from: hutch-- on December 30, 2022, 10:36:54 AM
If you wanted an editor with a MRU list ...
Me, I don't want or need one. Just helping Jochen with the initial debugging of his plugin, since no one else stepped forward to assist him.

jj2007

Quote from: zedd151 on December 30, 2022, 10:45:27 AMJust helping Jochen with the initial debugging of his plugin

Thanks a lot for your help, Z :thup:

zedd151

Quote from: jj2007 on December 30, 2022, 10:54:36 AM
Thanks a lot for your help, Z :thup:
No problem. Just don't forget to send that check to the Caymans ...

jj2007

Quote from: zedd151 on December 30, 2022, 11:13:06 AM
Quote from: jj2007 on December 30, 2022, 10:54:36 AM
Thanks a lot for your help, Z :thup:
No problem. Just don't forget to send that check to the Caymans ...

Already sent off with my fastest pigeon :thumbsup:

In the meantime, a refined version 5 is online. The installation is hopefully foolproof now: just launch the exe somewhere on the drive that hosts your \Masm32 folder. Sources are also there, in a separate archive.

To use the plugin,
- hit Alt TR when you launch QEditor (->&Tools, &Recent files)
- hit Alt F 1...9 to load the registered files (->&File, &1 ... &9)

zedd151

Quote from: jj2007 on December 30, 2022, 12:03:55 PM
a refined version 5 is online. The installation is hopefully foolproof now

"A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools." ― Douglas Adams  :tongue:
Otherwise this version works well.  :thumbsup: 

Oh, I forgot to mention... since you have inserted a different filter for "Open File", it might be a good idea to do the same for the "Save File As..." filter, if only for uniformity.  :icon_idea: 

Since the Save File As... dialog still uses the *.* filter, after saving a file as text, I was taken aback when I did not find the .txt file upon opening the Open File dialog until I noticed the change. I was used to all files showing, so I thought the file was not actually saved until I noticed the different filter in Open File...  :undecided:   Other users might be put off by this discrepancy as well...


And really you need to fix the resizing of qEditors main window too. It also resizes even though it was originally maximized. Another reason why some users might be put off by using this plugin.  :icon_idea: 

If you can fix these two issues, then the plugin should be ready for the general public. Or at least Masm32/qEditor users.


hutch--

jj,

Post this message and it will update every instance of menus in QE.

    invoke PostMessage,HWND_BROADCAST,WM_REFRESHMENUS,0,0

jj2007

Quote from: hutch-- on December 30, 2022, 02:16:03 PM
jj,

Post this message and it will update every instance of menus in QE.

    invoke PostMessage,HWND_BROADCAST,WM_REFRESHMENUS,0,0


Hutch,

Thanks, good to know. Have you tested the latest version? I chose a different approach: the plugin intercepts the WM_INITMENU message.

Quote from: zedd151 on December 30, 2022, 01:37:23 PM
Otherwise this version works well.  :thumbsup: 

Thanks :thup:

QuoteOh, I forgot to mention... since you have inserted a different filter for "Open File", it might be a good idea to do the same for the "Save File As..." filter, if only for uniformity.  :icon_idea:

Thanks for your suggestions. I rarely use QEditor, but the most nagging issue for me was always that the Open dialog presented me with loads of irrelevant files of the *.res, *.obj, *.exe, *.qsc, *.txt, *.ini etc types. When I open a file in an Assembly editor, it will be *.asm in 99% of the cases. So I changed the filter, and added a * category for the old *.* version.

That means that every once in a while you'll have to click into the filter combobox to select *, if you want to open, for example, a resource file. Afterwards, however, your dialog.rc file is accessible with Alt F2 (for example) via the MRU menu.

I could do the same with the Save/Save as... dialogs, but they are less urgent because normally you can just type the extension in a fraction of a second, e.g. MyFile.rc

My second most nagging issue with QE is that it opens as a useless tiny window in the middle of my 1366x768 screen. I thoroughly hate that, in fact all my windows are always maximized. There is Alt Tab to switch, there is a taskbar to click.

In the case of an Assembly editor, there is a compromise: it's a vertical language, one short instruction per line, so it makes sense to pick the maximum height but leave space to the left for other programs that the user might wish to see permanently.

However, I'll take your advice seriously and add settings for a) the filter, b) the MoveWindow service and c) the extra menu with the About MessageBox and the extra "see WM_ messages" feature :thumbsup:

hutch--

Editor's are like girlfriends, I would never use your editor as it is extremely unauthodox, runs in technicolor, weird formatting and in RTF, still, if that is what you like, I am pleased it works for you. I don't live in a redundant world trying to re-live the past, 32 bit works fine and I still write PB in 32 bit but with MASM, its 64 bit to get the full power of the OS, big memory, native 64 bit, all of the advantages that you don't have in 32 bit.

QE is a tool, it is designed to be neutral to as many people as possible, it was never eye candy, it will never have technicolor and while it is designed to add plugins into, it cannot be setup up to start anything as it is a security risk. It has its own scripting engine to address code templates and it has had the guts kicked out of it many time to ensure it is robust and reliable.

As far as file open options, it will open anything, even binary files but you certainly would not try and edit one. Without have to pick you way through extensions, in the same directory it will open asm, txt, rc, def which is far more efficient that picking your way through an open dialog list to try and find the right extension.

I see an MRU as a waste of time, with a multi-instance editor, any recording of files that have been open and closed would end up a confused mess, it has a menu option for all open windows and you can routinely shift from one window to another. I dislike pseudo automated applications, a pure ASCII editor is exactly what I wanted and designed, its easy enough to cook up little personal tricks but its lousy design to embedd them into an app that other people have to use.

You may understand why it will never be released as no-one will ever get the chance to "knife and fork" it.

zedd151

#59
Quote from: jjI could do the same with the Save/Save as... dialogs
Doesn't look normal that way. Should use the same filters, imo.
QuoteMy second most nagging issue with QE is that it opens as a useless tiny window in the middle of my 1366x768 screen. I thoroughly hate that, in fact all my windows are always maximized.
But qeditor now jumps from the original position to a position that is not properly maximized or centered after calling the pluigin, even if it was properly maximized before calling the plugin.
Not everyone has a 1366x768 screen * So it may center on your machine... but ... not on everyone else's.

Well if you expect others to use your plugin... Both of these suggestions might be useful. *Especially if those qeditor users are used to the way qeditor behaves*.
If you only coded the plugin to show that you can do it, then that is a different story. Do as you may.  :biggrin:
That's all I have to say about that.  :tongue:  Long live qeditor!  :biggrin: