I'm using Delphi 7, and I want to create a custom warning message (which will be shown at compile time), so I can warn other programmers on some modifications. I've searched on the internet but I didn't found anything relevant.
Other solutions, are welcomed as well, as long other programmers are warned about things I want, when they compile/build the sources.
We use $MESSAGE too, but with the WARN directive. Typically to alert developers to not implicitly compile units directly into their exe/bpl if it's already contained in another BPL that they should use as a package. D2005 here.
{$MESSAGE WARN 'File: FOOUNIT contained in PACKAGE:-> FOOLIB'}
In D2007 you can write
{$MESSAGE 'Hello'}
or
{$MESSAGE ERROR 'Hello'}
- see the documentation. This works since D6 (info courtesy of Sertac Akyuz).
Sometimes I also wish that such a feature exists. Unfortunately I don't know any solution that could handle my requirements.
The best approach I could imagine spontaneously would be a separate message file which will be synchronized by an IDE Expert. You can add a new message to this file with this expert like this
new DevExpress components (Build 123) required
and commit it to the VCS repository. After the other developers update their local working copies, the IDE Experts compares and synchronizes the message file with a local copy and displays the new messages.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With