Jump to content

dummzeuch

Members
  • Content Count

    2636
  • Joined

  • Last visited

  • Days Won

    91

Everything posted by dummzeuch

  1. dummzeuch

    memory usage of TJPGImage

    If you only need thumbnails, why not explicitly scale your picture to a bitmap of whatever size you need and cache that? Of course that takes time.
  2. dummzeuch

    memory usage of TJPGImage

    To get the size of a memory stream, add InstanceSize and Capacity. Unfortunately capacity is usually larger than the actual size of the data and of I remember correctly, TMemoryStream does not allow setting the capacity beforehand. But you can easily add that functionality. I think I've got such a class in my dzlib. Setting the size also sets the capacity, so If you know the expected size beforehand, set it first before writing to the stream to avoid allocating more memory than necessary. I have no idea how to calculate the memory used by a TJpegImage. If you want better performance, don't use TJpegImage for decoding but LibJpeg-turbo. I haven't measured it, but subjectively the difference is staggering.
  3. The Uses Clause Manager in GExperts has an “Identifier” tab that can be used instead of the Find Unit refactoring of the Delphi IDE (which for me doesn’t work most of the time and if it does is very slow). And of course the Uses Clause Manager also works for older Delphi versions which simply didn’t have this refactoring. For this to work it parses all source files in the various search paths of the project. And because this takes a while it caches the results and only updates this cache if a new unit is found or a unit has been changed. read on in the blog post
  4. The Rename Components expert in GExperts now has separate lists for the names and additional properties for VCL and FMX components. Previously it was a hassle to have additional properties shown in the rename dialog if these have different names in VCL vs. FMX e.g. the Caption vs. Text property of TLabel. Now you simply configure them differently. read on in the blog post.
  5. That's not GExperts specific. Every major Windows update breaks the Delphi 2007 installation in this way. I blogged about this issue a few years ago: Delphi 2007 on Windows 8.1 And I'm always glad I did, because I tend to forget how to fix it. Thinking about it now, I wonder if I shouldn't simply add those 4 files to my build tools and change the build script to have the environment variable point there.
  6. dummzeuch

    Delphi on virtual machine and licence

    If you have an active subscription, contact Embarcadero to have your standard Named User license converted into a Network Named User license. The price is the same and they usually don't have a problem with that. But beware that you will have to run your own license server to use such a license. It's not trivial but also not rocket science either. I run ours in a VM under a minimal Ubuntu Linux server because it needs less resources than Windows, but it can also run under Windows.
  7. dummzeuch

    About licence renew

    You usually get an email from Embarcadero with an offer to renew. Read that offer carefully because ours always contains a rather costly "Platinum Support" option which we don't want and have them remove every time. If you don't get an offer by that time, it's OK to contact your sales person by the end date. They will still renew the subscription after it has expired, but of course will date it back to date when your previous subscription expired.
  8. dummzeuch

    GExperts Grep Search

    It was a suggestion to file a feature request if you care to get this implemented. If not, don't file it. Maybe it was too subtle, yes. (I don't take anything from a discussion here as a feature request, unless I think it might be valuable for me myself. Or sometimes I actually remember it when I am working on something else and see an easy option to implement it. That's not the rule though.)
  9. dummzeuch

    How to get the actual UTC time??

    That depends on the definition of "dangerous". As long as a failure to contact an NTP server does not crash the system and does not create any wrong data, it might be an annoyance but it's not dangerous in my opinion. But yes, using an NTP service with distributed hosts is more likely to work. Of course that leaves the internet connection and the DNS as possible causes for failure as you already stated.
  10. dummzeuch

    GExperts Grep Search

    I guess that means a new feature request is incoming. Another option would be to only search files in the search path, but not in the debug search path. That would exclude the RTL units as they only exist in dcu form there.
  11. dummzeuch

    GExperts Grep Search

    If i remember correctly that's already the case
  12. dummzeuch

    GExperts Grep Search

    Enable the map file in the linker settings and then select "parse map file" in GExperts Grep. It will then search all files listed in the map file. Of course this only works if your project compiles or at least compiled at one time, so a map file exists. Also, the map file only contains files that contribute code to the executable, so e.g. units only containing ressourcestrings won't be searched.
  13. dummzeuch

    How to get the actual UTC time??

    That's the whole point of NTP.
  14. dummzeuch

    How to get the actual UTC time??

    If you don't want to use the local time of the computer, you need a different time source. There is of course NTP (network time protocol), if you have an internet connection. Then there are various hardware solutions, but if those are available they are usually already used to set the local time (actually, recent Windows already uses NTP to adjust the system time). And then there is GPS, which also contains UTC in various of its NMEA sentences. Always keep in mind that there is a delay between the source sending the time and your program receiving it.
  15. dummzeuch

    D10.4.2 where's setting to not debug into RTL ?

    You can compile without debug dcus. That's in compiler settings. Or you can press F8 (step over) or even Shift+F8 (run until return). And then there is a plug-in by @Uwe Raabe that can manage which debug dcus should be used. I forgot the name though.
  16. dummzeuch

    Tool to inspect properties at run-time?

    There is also an object inspector component in the jvcl.
  17. dummzeuch

    How to ADD CodeLibrarian snippets database?

    It is a GPStructuredStorage file written by @Primož Gabrijelčič. The implementation is in unit GPStructuredStorage located in externalsource. If I remember correctly this expert originally used some kind of database but since the Delphi personal editions didn't support databases at some time it was changed to this free format supported by all Delphi versions and variants. No idea whether Primoz was actually involved in this or just contributed the format and implementation.
  18. dummzeuch

    How to ADD CodeLibrarian snippets database?

    There is no way to import snippets or merge two .fs files. The file type is binary, so it's not even possible to merge them manually with an editor as it would be possible with a text based file. I guess an export and import functionality would be nice, but I doubt that I will implement it any time soon. But feel free to add a feature request on SourceForge.
  19. dummzeuch

    gridlines in listboxes

    I don't really see much of a difference between using a listbox and using a one column string grid.
  20. dummzeuch

    Snap to Grid??

    No. You will have to move a control with the mouse for this to happen. Alternatively you can select (many) controls and click Position -> Snap to grid in the context menu. Whichever way you chose, it requires manual work.
  21. dummzeuch

    gridlines in listboxes

    What about TStringGrid / TDrawGrid?
  22. dummzeuch

    New Community Edition

    ping @David Millington
  23. dummzeuch

    How do you set no row selected on TDrawGrid?

    You can't. What you can do is do the drawing yourself (isn't that necessary for TDrawGrid anyway?) and if nothing is supposed to be selected, don't draw the focus rectangle. But that would only be visual, If you read row and column they will still have some value. And it would also be necessary to somehow detect when something is being selected. It's easy to detect when the user clicks on something with the mouse, but more difficult when he wants to use the keyboard. It might be easier to have a special row that contains the entry "<nothing>" or similar instead.
  24. dummzeuch

    Edit Entity shortcut inconsistent

    GExperts can only check for shortcuts that are assigned to actions registered with the IDE. The keyboard shortcuts of the code editor cannot be discovered through any means that I know of (which is a real shame, because it should be simple to create an OTA method for it).
  25. dummzeuch

    Build / Output messages filtering plugin

    Which Delphi version was that for? My guess would be Delphi 7 or earlier, because later versions use a VirtualTreeview and I found no way to get at its contents.
×