-
Content Count
2935 -
Joined
-
Last visited
-
Days Won
166
Everything posted by Anders Melander
-
D11 - Form changes size when I compile/build. :-(
Anders Melander replied to Ian Branch's topic in Delphi IDE and APIs
So revert to a version that does exhibit the problem and try again. You are using version control, right? -
D11 - Form changes size when I compile/build. :-(
Anders Melander replied to Ian Branch's topic in Delphi IDE and APIs
Well, save the file and compare the DFM before/after. What changed? -
D11 - Form changes size when I compile/build. :-(
Anders Melander replied to Ian Branch's topic in Delphi IDE and APIs
Well now that I think about it the setting doesn't have to be enabled. When you have a form opened in the IDE then the IDE will use the opened copy of the form (and the source) when compiling instead of using the original on disk. So let's say that loading the form somehow alters the state of the TCustomForm object. When compiling the problect this form is "saved" (i.e. the DFM is streamed in binary format) to the internal buffer and then linked into the executable as a DFM resource. If you open the form in the IDE and (view it in form designer ) and then immediately close the unit, are you prompted to save the unti? -
D11 - Form changes size when I compile/build. :-(
Anders Melander replied to Ian Branch's topic in Delphi IDE and APIs
My guess is that the values are modified on save and that you have Save on compile checked. There could be something wrong with the writers defined in TCustomForm.DefineProperties. -
Delphi 11.0 Alexandria produces more compact x64 executables than 10.4.2 Sydney !
Anders Melander replied to A.M. Hoornweg's topic in Delphi IDE and APIs
Need a hug? 🙂 -
Delphi 11.0 Alexandria produces more compact x64 executables than 10.4.2 Sydney !
Anders Melander replied to A.M. Hoornweg's topic in Delphi IDE and APIs
I think even back then people were complaining that Delphi exes were too big. It's not that I can't see the beauty of small executables (I envy the size of an exe produced by a C program using only the standard libraries), the size just hasn't been a priority in what I used Delphi for for a few decades. -
Delphi 11.0 Alexandria produces more compact x64 executables than 10.4.2 Sydney !
Anders Melander replied to A.M. Hoornweg's topic in Delphi IDE and APIs
That doesn't really say anything. Most of Windows is written in C and asm, so are more fair comparison would be against Turbo Pascal... -
Menu captions with images are hard to read under Windows 11
Anders Melander replied to Tom Mueller's topic in VCL
Yup. Found the following comment in the Drag and Drop Component Suite source code: -
Menu captions with images are hard to read under Windows 11
Anders Melander replied to Tom Mueller's topic in VCL
No, not always. There was a time when Windows didn't handle it properly or at all. The details eludes me though so it was probably pre-Vista. You can't lay all the fault on Delphi. There have been many versions of Windows that didn't handle images in menus properly. For example I know I've had to resort to ownerdrawing menu items in Explorer context menu extensions because some combinations of menu item attributes caused the images not to be drawn or drawn incorrectly. -
Delphi 11.0 Alexandria produces more compact x64 executables than 10.4.2 Sydney !
Anders Melander replied to A.M. Hoornweg's topic in Delphi IDE and APIs
Comparing the map files could provide a clue. -
Reminds me of this one:
-
TFDQuery Async execution aborts with out of memory
Anders Melander replied to Clément's topic in Databases
Well I got curious and peaked at the source anyway. It seems you can call AbortJob on the query even while it's blocked. Also, TFDConnection.AbortJob just iterates the connected datasets and calls AbortJob on each of them. -
TFDQuery Async execution aborts with out of memory
Anders Melander replied to Clément's topic in Databases
I don't have time right now to check the FireDAC source but it seems strange if FD has been designed so you can only cancel a non-blocking query. The natural pattern would be to execute a blocking query in a thread and cancel that from another thread (e.g. the main thread). Anyway, it seems you can cancel the query at the connection level via TFDConnection.AbortJob. -
Menu captions with images are hard to read under Windows 11
Anders Melander replied to Tom Mueller's topic in VCL
16 colors ought to be enough for anybody? 🙂 -
TFDQuery Async execution aborts with out of memory
Anders Melander replied to Clément's topic in Databases
Out of memory errors in threaded applications can be really hard to recover safely from. It largely depends on allocation pattern and the nature of the out of memory error. In single threaded applications it's easier but there's still no guarantee that it can be done safely. The problem is that once you run out of memory you might not have enough memory to report and handle the problem. Luckily an out of memory error is often caused by to trying to allocate a big hunk of memory and if that allocation fails then there's still memory available, just not enough to satisfy that particular allocation request. One "trick" that I've used occasionally is to allocate a large recovery block when the application starts. If an out of memory occurs then this block is deallocated, the allocation is retried and the user is notified that they're about to run out of memory. You will need a custom memory manager (or just a wrapper around the existing one) in order for this to work and multi threading might get in the way. Or you could just recompile for 64-bit 🙂 With regard to not being able to handle the error in the async execution; Couldn't you just execute the query in your own thread instead and handle the problem there? -
If you plan on doing this with a mobile phone then just turn the chair around and record the person against the live background... It's called a selfie I hear 🙂
-
You don't have to tell them that the problem still exists. They know that they haven't fixed it. You won't get any meaningful answer to your question.
-
https://quality.embarcadero.com/browse/RSP-22089?jql=text ~ "formatter inline"
-
TL;DR Your discontent IMO has nothing to do with the topic and only sabotages the OPs attempt at a discussion.
-
I can't say that I disagree wrt the localization tools. I only wish they would have admitted that they were completely broken (apparently beyond repair) 20 years ago, and deprecated it then, so we didn't have to waste time on that dead end. That said, while the ITE/ETM tools never worked, the RTL part of the localization system (i.e. resourcestrings, resource modules, etc) has always worked very well IMO. With regard to gettext/PO-files I've never had much success with it because it basically just translates phrases without regard for context. There are functions in gettext to translate with context, but the context has to be specified explicitly in code. https://www.gnu.org/software/gettext/manual/html_node/Contexts.html
-
Instead of hijacking this thread with yet another off-topic wall of text about why Embarcadero sucks and Delphi is doomed, maybe you could start your own thread?
-
Best way to replace D11 distributed Indy with latest Git Indy?
Anders Melander replied to Ian Branch's topic in Indy
I would leave the bundled Indy, and the global library search path, be and instead add the Indy repo as a submodule to the project repo and add the local path to that submodule to the project search path. Of course that only works as long as the design time properties of the bundled Indy and the one in the Git repo are compatible. -
I'm afraid the integrated localization tools has been officially deprecated. Unfortunately the documentation still hasn't been updated to reflect this fact. https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Release_Notes#Translation_Tools So your best option is to use one of the many alternatives available. There exist both commercial and freeware solutions. I'm the author of one of the freeware solutions (the one linked to by Darian above) so I'll leave it to others to list the pros and cons of the different alternatives.
-
why shortstring in Delphi cannot used in our Programs using New IDE?
Anders Melander replied to bravesofts's topic in Algorithms, Data Structures and Class Design
And even without them we're now stuck with the zero based string helpers. What a turd. -
I'm sorry about that, although I don't quite understand why you find it offensive. I'm sure Joe knows his stuff but appearance does matter. I actually looked at the site trying to find more information about the library but eventually gave up. Now that I look at it again I can see that what I thought was just more bullet points is actually links to sub pages. After that I had to read through all the FAQ to deduce that it's not a native Delphi library. If I had actually been looking to buy a PDF library (I'm not since I have a DevExpress subscription) I would have taken one look at that page and quickly moved on. Joe or not.