

timfrost
Members-
Content Count
212 -
Joined
-
Last visited
-
Days Won
3
Everything posted by timfrost
-
If you need to handle time zones all around the world, for users and senders in different time zones, I recommend TZDB from https://github.com/pavkam/tzdb. It is essentially a single PAS file which has all the TZ and DST data and functions you need. There are also other tools, including one to update the source code from the IANA database, which is updated a few times a year. Of course you also need to follow the advice above about how to parse the input! As I have said here before, I suggest tweaking the database extraction tool to exclude all the historical data, which it seems unlikely you will need.
-
You can call FastMM_ApplyLegacyConditionalDefines if you already have defines in your code to control logging; it will then use them. But there is new, finer, control of the logging for FastMM5 and you can select FastMM_LogToFileEvents as you wish. The extensive documentation in the source describes all this, and there are basic instructions about logging options at https://github.com/pleriche/FastMM5. Someone (but perhaps not from the USA during this holiday season) will no doubt be along help with a more comprehensive answer; I mainly make do with the defaults.
-
TIDSmptServer does not receive mail from certain client [Fixed]
timfrost replied to mvanrijnen's topic in Indy
Your logs only show what is coming in, not what is going out, but my guess is that the Indy server rejected the BDAT command (binary data) as invalid. I have never seen one before in the wild, and I see that the RFC1830 that introduced this command in August 1995 marks it as 'experimental'. -
I have only seen a link to a zip with the EXE/CFG files. If I had known where to find the source I might have worked out what compressed=0 does!
-
It would be much more logical to have an option in UsesCleaner which makes it follow the settings in GExperts formatter. I want to define my formatting preferences in the formatter, which seems to me to be the right way to do it. Why should I have to reformat every unit with my chosen formatter settings (without any option set to match another application, of course) in order to fix the unwanted format changes that the UsersCleaner has made? If I could find the UsesCleaner site and a place for feature requests, I would add one: please add an option to never change unit sequence and never add or delete newlines in the uses section and always retain comments. This would then cover a preference in any formatter to have one unit per line.
-
I use TMS TadvStringGrid when I need to do this, but it is not free and not available on its own. It can build the combobox with an entry for every different value in the column, or you can override it to create entries manually such as 1-20. 21-40, >40, and filter them yourself. It puts an icon in the header row which you click on to filter. I am sure that there are other grids available from other vendors with this capability, but I happen to use TMS
-
Remove non-utf8 characters from a utf8 string
timfrost replied to borni69's topic in Algorithms, Data Structures and Class Design
Despite the name of this topic I cannot remember seeing any of your code which actually references a UTFstring. If you want an answer to the original question, the 'lazy programmer' solution (and so occasionally mine) is to pass the UTF8 text to the Windows API MultiByteToWideString function with source code 65001 (UTF8). With the normal options, any invalid UTF8 sequences should be returned as Ufffd in the returned Unicode string, and you can walk the result and drop them. This is not the 'proper' way to approach the problem, but it should work. -
Sent; it is my broken project file which causes it to crash!
- 13 replies
-
- project magician
- line breaks
-
(and 1 more)
Tagged with:
-
Does Project Magician support 10.4.1 project files? Or alternatively, is the command-line program supposed to work if I select none of the IDE options? If the answer to both of these is 'yes' I will report a null-pointer exception when running the command-line version to try it.
- 13 replies
-
- project magician
- line breaks
-
(and 1 more)
Tagged with:
-
Best way to prevent multiple instances? Mutex not working
timfrost replied to bilbo221's topic in VCL
But lack of SeCreateGlobalPrivilege privilege may cause creation of the Mutex to fail, as was mentioned by the OP. -
Best way to prevent multiple instances? Mutex not working
timfrost replied to bilbo221's topic in VCL
The very simple Mutex may not work if multiple instances of your application may be running in different accounts, with different credentials, or as a service. -
Best way to prevent multiple instances? Mutex not working
timfrost replied to bilbo221's topic in VCL
I have tried several components over many years, and the only one that has proved simple and reliable under all circumstances is JclAppinst.pas in the JCL. Many options if you need them but for simply checking that there there is only one instance you need only two lines of code added to your DPR: one supplying a GUID and then a call to JclAppInstances.CheckSingleInstance. -
Message Dialog Expert form is too small in Delphi 10.3.3 & 10.4
timfrost replied to Ian Branch's topic in GExperts
I can reproduce the initial screen being too small on my 3840x2160 monitor. But it would be sufficient to fix the failure to save the size between usages, to avoid the annoyance of resizing it every time, and this might not require a matching monitor. I am sorry, but I am not motivated to learn enough about the Gexperts source to discover how/where you prefer to save dialog sizes, because this is a Gexperts item that I have never used! -
10.4.1 Released today
timfrost replied to Darian Miller's topic in Tips / Blogs / Tutorials / Videos
Since you ask, just some GUI issues: https://quality.embarcadero.com/browse/RSP-30043 Nothing major, just simple and annoying; not included in the fix. https://quality.embarcadero.com/browse/RSB-3800 Equally annoying; included -
All of my programs have a custom manifest file, specified using $R in the DPR. I have different combinations of administrator and dpiPM manifests for different programs. Using a $R entry in the DPR allows me to have a common Finalbuilder action for building EXE files, with only a couple of variables needed, and allows me to build either in the IDE or for production. In the IDE, none of my projects specify a manifest. In just one single program, this fails, because Delphi inserts its own windowsXP.res containing an XP manifest into the EXE. In consequence this application, which requires elevation, gets two manifests and the XP manifest wins. Watching the build with PROCMON shows this file being picked up and used. The unwanted manifest is inserted both when compiling in the IDE and in Finalbuilder. I have tried deleting all the project files other than the DPR and starting afresh, to no avail. None of the unit sources or resource files reference this Windows XP manifest. I can get around this issue by removing the $R and instead specifying a custom manifest, but this is untidy because I then have to have to build this program differently from all the others in Finalbuilder. Can anyone suggest what might be causing this resource file to be picked up?
-
Unwanted Windows XP Manifest inserted
timfrost replied to timfrost's topic in RTL and Delphi Object Pascal
Thanks, both. I had just found that one myself, but of course it is not in the link map, because it contains no code. But it does show up on searching in the full PROCMON listing for bds.exe, now that I have stopped filtering it on windowsxp.res. So I think I can track it down to a form this application has borrowed from elsewhere; not code I have written. This level of detective work is always a fun task for a cold Sunday! -
SynEdit replacement for Delphi 10.1 Berlin / editor wanted for source code (not Delphi)
timfrost replied to Mr. Daniel's topic in VCL
PlusMemo (www.ecmqc.com/ecmhome.htm) is an excellent and well-supported editor component; low-cost but not free. It comes with an add-in for line numbering. -
High-level interface-based encapsulation of Direct2D Svg functionality
timfrost replied to pyscripter's topic in Windows API
Can you add to Github a note of precisely which operating systems this supports? At the start of this thread Windows 10 Creators Update or later was mentioned, but this is not made clear as far as I can find. What is the fallback on an unsupported OS? -
Native Svg parsing and painting in Windows
timfrost replied to pyscripter's topic in RTL and Delphi Object Pascal
Why is SVG so flaky when used in desktop applications? I have SVGs created using major commercial and free applications, which display without problems both in other applications and in any browser I choose, but which fail miserably to display in any of the Delphi libraries I have tried. The library authors seem to feel that once they can display the tiger and a few simple geometric-shaped icons, the product is ready to ship. I would like to display a variety of logo images and diagrams using SVG, not just small icons on a menu bar or button. But as soon as an image involves 'text on a path', or complex patterns or shading, or some other common graphic style, each library I have tested gets it wrong; and not even wrong in the same way that a different library or a similar example gets it wrong. SVG would be a great solution if only the implementations worked reliably with any valid SVG file. -
Provided, not provides; and Eldos no longer owns the emasculated remains of this redesigned product.
-
Help with string extraction function
timfrost replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
But the original code was surely much easier to understand and maintain. And who can say whether the last one is 'better'? What surprises me is that nobody has jumped in with a one line incomprehensible Regex. -
I see Indy help in the IDE menu under Help / Third-Party Help
-
I see from the response to Vincent's post in the TMS forums that Roman is already working on this issue in FixInsight.
-
Depth First Search vs. Breadth First Search in directories
timfrost replied to dummzeuch's topic in Algorithms, Data Structures and Class Design
There are two simple enhancements that can be made to Delphi FindFirst (which I never call, having adapted it into my own version as a replacement). I do not think that either will help you search a Samba network drive, but together they can significantly enhance file searching on Windows file systems. The secret is to call Windows FindFirstFileEx instead of FindFirstFile, which is used both by Delphi FindFirst and therefore also by TDirectory.GetFiles. On modern OS, the 'Ex' function allows you to opt for a larger buffer, and also to omit the double search for the 8.3 equivalent alternate names in addition to the full file names. Once you have set up the 'find' optimally in this way, you can call the standard FindNext and FindClose functions as usual. MSDN has the details you need for FindFirstFileEx. But to address your question, my guess is that your recursive search would turn out to be faster than multi-threading the subfolder searches, if you were to measure it. And measuring in your own environment is the best way to get the answer. -
Form.PixelsPerInch is no longer used in Delphi 10.3 while scaling
timfrost replied to Ramu's topic in VCL
I develop on a machine with 200 and 120 dpi screen and simply make sure that all the form DPI settings are set to 96. In Delphi 10.3, with per-monitor DPI enabled, this usually 'just works'. When it does not, the cause is usually a component which does not handle the 'before' and 'after' MonitorDpiChange events properly or at all. There are fewer of these around these days; but we still have a few which required either source modification, or adjustment of their settings by handling these events in our application.