New Filter Exceptions expert in GExperts

 Delphi, GExperts  Comments Off on New Filter Exceptions expert in GExperts
Jul 132020
 

I my last GExperts related blog post I wrote about the new “Close Exception Notification” expert which I just had added to GExperts. It was a hack that hooked the Exception Notification dialog.

This spawned a discussion in the international Delphi Praxis forum and resulted in a rewrite of the expert. It’s now called “Filter Exception” expert and instead of hooking the dialog it directly hooks into the code that shows this dialog. Thus it prevents the dialog from being shown for filtered exceptions.

I have to thank Mahdi Safsafi of Delphi Detours Library fame for the detective work that lead to to this hooking code.

In that same discussion Der schöne Günther suggested to add a project scope to the filtering. I have implemented that too.

So now the expert can filter on:

  • Project name, which is a regular expression.
  • Exception class
  • Exception message, which again is a regular expression

I have added all those exceptions that the Delphi IDE raises on every startup to my filter. It filters on the Project = “GExperts.*”, the exception classes and the messages it shows.

That means it will no longer annoy me with them while I am debugging GExperts but will still show them for other projects.

The filter details look like this:

It’s also possible to add a filter for the current debug session only, which means that it will be deleted automatically once the debug session ends.

Unfortunately hooking of the code is only available for Delphi 2005 and later. Older versions still have got to hook the Exception Notification dialog.

If you want to test this new functionality, you’ll have to compile your own dll. Try it, it’s not rocket science!

If you want to discuss this article, you can do so in the corresponding post in the international Delphi Praxis forum.

 Posted by on 2020-07-13 at 16:59

Display text attachments inline in Thunderbird 68 and later

 thunderbird  Comments Off on Display text attachments inline in Thunderbird 68 and later
Jul 082020
 

Apparently there has been a change in Thunderbird 68 so it no longer displays text attachments inline even though View -> Display Attachements Inline is turned on.

There is a solution to this though:

  • Open Tools -> Options
  • Select the Advanced page
  • Switch to the General tab
  • Start the Config editor (button on the bottom right)
  • Press “I accept the risk”
  • change the “mail.inline_attachments.text” value to true

Source: Mozilla Support page

 Posted by on 2020-07-08 at 11:14

GExperts supports even more laziness

 Delphi, GExperts  Comments Off on GExperts supports even more laziness
Jul 042020
 

I got into programming because I am lazy, I’d rather have the computer do the boring work than doing it myself. So it’s no wonder that I always liked Delphi and GExperts because both support my laziness.

Today I added yet another feature to save me a key stroke or mouse click: The “Close Exception Notification” expert.

You probably have encountered those libraries that always raise the same exception class on errors, or even worse, raise the generic Exception class instead of bothering to declare their own. And if I should guess, you have probably been guilty of doing that yourself (as I definitely have).

Why is that a problem, you ask?

Because you can’t easily ignore these exceptions during debugging. You always get this “Debugger Exception Notification” dialog, have to read it and decide whether you want to break and look at the code or ignore the exception:

There is this nice option to “Ignore this exception type”, but unfortunately ignoring the exception class “Exception” is rarely an option.

The same problem occurs with other rather generic exceptions like EFOpenError which you can’t really simply ignore but need to check for the file name.

So, what we need is a more finely grained filter based on the message.

Enter the new “Close Exception Notification” expert. It adds a “GExperts” button (I need a better caption) to the dialog above which lets you add filters for Exceptions based on class name and message. And since it was more convenient for me (more laziness), the message filter is a regular expression.

This button will call a configuration dialog which allows you to configure how to handle the current exception.

This dialog is mostly pre-filled if opened through the button on the “Debugger Exception Notification” dialog.
You first enter (there will be some kind of recently used list in the future) the exception class name and then a regular expression for the message. In the simplest case this can be the whole message (but beware of characters which have a special meaning in regular expressions, like ‘.’, ‘*’, ‘?’ or ‘\’). There is an additional input field which you can use to test whether the regex matches the message. When you are satisfied with your newly created rule, select the action to take automatically and press OK. The dialog will close and the action will be executed for the first time, e.g. the Ignore button will automatically be pressed.

The “Close Exception Notification” expert does not have a menu entry. But there is a configuration dialog which gives you a list of currently configured filters.

Unfortunately since this expert cannot directly modify the IDE code and I am not aware of any Open Tools API access to the exception notification, it has to hack the dialog. This results in the dialog being displayed for a short time before the expert “presses” the button for you. This is certainly not ideal but still better than not having it.

There is no GExperts release with this new functionality yet, so in order to get it, you will have to compile your own DLL.

If you want to discuss this article, you can do so in the corresponding post in the international Delphi Praxis forum.

 Posted by on 2020-07-04 at 14:54

Fixing wrong position and size of the Delphi 10.4 IDE window

 Delphi  Comments Off on Fixing wrong position and size of the Delphi 10.4 IDE window
Jun 062020
 

Apparently the bug that causes the Delphi IDE to not store its position correctly when placed in full screen on a secondary monitor to the left of the primary monitor (which is my setup at home and at work) still hasn’t been fixed in Delphi 10.4. Luckily the work around of editing the desktop settings still works.

For Delphi 10.4 these files are stored in

C:\Users\<YourName>\AppData\Roaming\Embarcadero\BDS\21.0
 Posted by on 2020-06-06 at 19:20

dzBdsLauncher 1.0.5 released with major improvements

 Delphi, dzBdsLauncher  Comments Off on dzBdsLauncher 1.0.5 released with major improvements
Jun 012020
 

I revisited my dzBdsLauncher tool again – no idea why, it just occurred to me 😉 – and added quite a few improvements:

  • It now supports .dof (Delphi 6 and 7) and .bdsproj (Delphi 2005 and 2006) files.
  • In addition to the previous checks it now also looks at the disabled packages list to determine which Delphi version to start. That’s the only option for Delphi 2005 and 2006 because these files are nearly identical.
  • It can now also handle .dpr files by looking for corresponding .dproj, .bdsproj and .dof files (in that order) and taking these to determine the correct Delphi version.

As a side effect I found a problem with the Delphi 10.1 version of the GExperts .dproj file. It had a wrong ProjectVersion entry.

 Posted by on 2020-06-01 at 17:36

GExperts 1.3.16 experimental twm 2020-05-27 released

 Delphi, GExperts  Comments Off on GExperts 1.3.16 experimental twm 2020-05-27 released
May 272020
 

There they are, the promised GExperts 1.3.16 installers for older Delphi versions.

This time I didn’t blog much about the work I did on GExperts. I spent a lot of time actually working on it instead. There are lots of bug fixes and a few new features in the new version.

I hope this time the installers won’t be wrongly detected as malware by virus scanners. Sorry about that.

The new version is available for download on the GExperts download page.

 Posted by on 2020-05-27 at 21:14

GExperts 1.3.16 for Delphi 10.4

 Delphi, GExperts  Comments Off on GExperts 1.3.16 for Delphi 10.4
May 272020
 

Today I downloaded and installed the latest and greatest Delphi 10.4. The first thing to do, was of course compile GExperts for it.

Thanks to Achim Kalwa I already had a working project and he also made all other changes necessary to make it compile. So basically I loaded the project and pressed Compile.

A few tests have shown no problems, but I am sure there will be some. On the other hand I don’t want to be the one to find them all. That’s what users are for, aren’t they? 😉

OK, so if you are brave, you can download an installer for GExperts 1.3.16 for Delphi 10.4. Please file any bug reports and feature requests as tickets on SourceForge.

For those still using older Delphi versions, there will also be a GExperts 1.3.16 release shortly. Watch this space.

 Posted by on 2020-05-27 at 20:35