Too many modal message boxes

Started by Saga Musix, July 08, 2009, 09:14:11

Previous topic - Next topic

Saga Musix

When you start up OpenMPT without a default.mkb in MPT's folder, you get three messageboxes. If you don't have plugins installed and load a tune with many vst plugins, you get a lot of messageboxes (the double amount if you're in debug mode even). Modal dialogs are evil. Especially if they keep buggin you all the time. There are more of them, but I think those two are the most annoying ones. What shall be done?
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

LPChip

I would go for a logfile. Make every error one line, and when all the errors have been given (unless they are severe errors, then display) show one dialog with a textbox showing the log entries.

Like:
-----------------
During startup, the following non-critical errors have been triggered:

SYSTEM:
Could not load C:\modplug\default.mkb

PLUGINS:
Could not find C:\Deleted\Directory\MyVST\plugin.dll
Could not find C:\Deleted\Directory\MyVST\plugin2.dll
Could not find C:\Deleted\Directory\MyVST\plugin3.dll
Could not find C:\Deleted\Directory\MyVST\plugin4.dll

A logfile has been generated: C:\modplug\errorlog.txt
--------------
   OK
--------------

The logfile contains:
=======================
2009-07-08 14:32 PM - The following non-critical errors were triggered:
-----------------------------------------
SYSTEM:
Could not load C:\modplug\default.mkb

PLUGINS:
Could not find C:\Deleted\Directory\MyVST\plugin.dll
Could not find C:\Deleted\Directory\MyVST\plugin2.dll
Could not find C:\Deleted\Directory\MyVST\plugin3.dll
Could not find C:\Deleted\Directory\MyVST\plugin4.dll
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Saga Musix

creating a logfile is rather out of question because users won't read it anyway. this is more about code design than about redirecting these annoyances to a different location. apart from that, the VST messages appear when loading a tune, not when loading mpt. the annoying thing is that you get dozens of useles modal messageboxes (modal = you can't do anything until the dialog is closed), where one would be sufficient.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

LPChip

Yes, I'm aware. I'm not saying that its a log file only, but since you're collecting info anyway, putting everything in a logfile is always handy. The idea is to also show this info on the screen so the user will read it. The logfile is purelly for reference since you want to close the dialog and then fix the issue.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Relabsoluness

Quote from: "Jojo"When you start up OpenMPT without a default.mkb in MPT's folder, you get three messageboxes.
Yes, one should be enough; the two first ones could be written to a log that LPChip suggested. Currently there are some primitive logging in the code but I think a better and more verbose one which also (optionally) gets written to file could be useful for devs and users alike.

Quote from: "Jojo"Modal dialogs are evil.
Especially when misused. I think for example tooltip-style message windows would in many cases be a much better alternative compared to modal messageboxes. Due to the framework, however, it's just so much easier to create a modal messagebox.

Quote from: "Jojo"There are more of them, but I think those two are the most annoying ones. What shall be done?
I don't see the keyboard related problem that serious - this shouldn't be a common problem for users (and actually perhaps it would be feasible to include a read-only default keymap in the executable's resources in addition to the actual file. Then there would always be at least some default keymap available). The VST problem affects more people: for now, perhaps just gather all the 'this is missing'-notices and show them all in one window; ability to search for each of them individually from KVR doesn't seem that essential feature.

Saga Musix

And still, one could open several browsers / tabs with the name of the missing plugin. i think the feature is useful, but that's not a reason for me to show 20 modal messageboxes.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

LPChip

Agreed. One positive thing about model messageboxes, is the copy feature. Whenever you have a message popped up, press CTRL-C and it'll copy a textform of that messagebox into the clipboard. :)

I use it alot at work to copy errors in textform into our call-registration system.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Saga Musix

I don't think that this works with default messageboxes. At least it never worked for me. No matter if they're modal or not.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

LPChip

Quote from: "Jojo"I don't think that this works with default messageboxes. At least it never worked for me. No matter if they're modal or not.

Yes it will. Only if an application uses a different than the default windows popup box (even the javascript:alert('msg'); works), then it can't be used.

Try it.

Find a program/game/whatever... and copy its content using CTRL-C, then paste into notepad.

An example of a net send dialogbox:

---------------------------
Messenger-service
---------------------------
Bericht van LPCHIP1 aan LPCHIP op 9-7-2009 0:05:19



this is a test
---------------------------
OK  
---------------------------

Try it: do net send xxxx this is a test

(replace xxxx with either your username/computername).

Note: you need to have the messenger service enabled for this to work, or you'll get an error.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Saga Musix

Well, I wonder where OpenMPT gets its messageboxes from, because they do *not* show up in the clipboard.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Sam_Zen

Nice tip, LP.. At least with the .mkb message it works.
And this message is generated by OMPT, because, if minimized to the taskbar, it shows the red icon.
Caught from clipboard :
Can't open file keyboard config file c:\nnnnn\sndtools\ompt_beta53\default.mkb  for reading.

And a smooth idea by Realab to include a read only default keymap in the package.
It's often better to avoid these messages in the first place.

Anyway, this message looks odd, because it comes when opening OMPT beta 54..
When updating the version, I wrote the new exe over the old one, with the .mkb file still in the root.
Checked, the path to the .mkb appeared to be still the old one in the ini-file.
After editing the ini-file, the message was gone.

So I guess, if the path for the VST plugins is not correct in the ini-file, one gets messages too.
Of course, when a needed plugin doesn't exist on the system anywhere, it's obviously causing a message.
0.618033988

Saga Musix

Quote
And a smooth idea by Realab to include a read only default keymap in the package.
I don't know where you downloaded modplug ( :nuts: ) but there's several keymaps included with modplug. However, if you're compiling the sourcecode you normally don't have a keymap in that directory, or if you move the exe to a different directory, no "readonly" or whatever keymap will ever prevent you from not copying the keymap with the exe file.

And Sam, this is not about modplug not finding stuff, it's about a very bad programming practice, namely using modal notifications where they are not needed, in some cases even popping up dozens of them.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Relabsoluness

Quote from: "Jojo"However, if you're compiling the sourcecode you normally don't have a keymap in that directory, or if you move the exe to a different directory, no "readonly" or whatever keymap will ever prevent you from not copying the keymap with the exe file.
Perhaps you missed the essential part in my post: "include a read-only default keymap in the executable's resources". In practice this means that the text of default.mkb would be included in the exe-file itself as resource so keys would always work without any additional file, and of course an editable file would be created after first run and that would be used thereafter to load the keymap.

Saga Musix

Well yeah, I was just looking at Sam's post.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Sam_Zen

Quote..it's about a very bad programming practice, namely using modal notifications where they are not needed..
I understand.
0.618033988