Jump to content

corneliusdavid

Members
  • Content Count

    569
  • Joined

  • Last visited

  • Days Won

    11

Everything posted by corneliusdavid

  1. corneliusdavid

    False leak reported on FindFirst/Findclose inside a Threa?

    Right, but only if FindFirst returns true; if it's false, that block of code, including FindClose, is skipped. However, as Anders pointed out, if FindFirst fails, it doesn't allocate memory and thus does not need to call FindClose. It's possible that MadExcept is thinking that there could be a memory leak when there isn't actually one.
  2. corneliusdavid

    False leak reported on FindFirst/Findclose inside a Threa?

    Ah! Then ignore my post. Thanks for pointing that out.
  3. corneliusdavid

    False leak reported on FindFirst/Findclose inside a Threa?

    if "FindFirst() = 0" returns false, then FindClose() is never called. From the documentation: "FindFirst allocates resources (memory) that must be released by calling FindClose"
  4. corneliusdavid

    D12 CatalogRepository Problem!

    I would think either copying the files from the CatalogRepository or choosing a different path from the default offered by the professional installer would be make things so much simpler. https://www.bonfire.com/dont-accept-the-defaults-abel-wang/
  5. corneliusdavid

    tform inside isapi webbroker

    There was nothing but FireDAC database components, a FDConnection and a few FDQueries--that's it. But--I found the problem! I had first created a FireMonkey program to test database connection and query results. Then I created an ISAPI DLL and copied the data module over and got the error. For easier debugging, I created a new a CGI app with just "hello world" for the default path, and that worked. So, then looked more closely at the data module and remembered to check the platform to which it's assigned and realized it had carried over the Firemonkey platform in its data module. The solution was to change the ClassGroup property of the data module from FMX.Controls.TControl to System.Classes.TPersistent and all is good.
  6. corneliusdavid

    Format text in TSpinBox

    If the only reason you're not using the TTimeEdit is because of the tiny up/down arrows on Windows (which I agree are practically useless), then you could build your own compound component out of a couple of combo boxes and buttons all squished together. But if you're targeting mobile platforms, you might want to see how the TTimeEdit looks on those platforms--they might look quite different. Or you you could use the IFMXPickerServices.
  7. corneliusdavid

    tform inside isapi webbroker

    @Kas Ob., I got this same error just yesterday--not for creating a TForm but for creating a TDataModule. I thought for sure I could create a data module in addition to the web module used by the ISAPI DLL. Certainly, this is a different issue, right? @RDP1974, Why would you want a Form in a web module? If you want to display something, it would be returning HTML through a web action. Or, you could create a CGI app and run it from the console to see some output--but that's still not going to allow a TForm.
  8. corneliusdavid

    Delphi 11.3 Community Edition Licensing

    This falls under "Registration & Installation" so you get free support from Embarcadero: https://www.embarcadero.com/support
  9. corneliusdavid

    Font selection for coding

    It looks like it's advertising for his Free Typography course. But actually reading through it, I can't understand why anyone would want ligatures in their coding font. At least he quoted and linked to Matthew Butterick's article--with which several of the commenters (and myself) agree. For me, I've used Consolas for so long, anything else is uncomfortable.
  10. corneliusdavid

    Advise the component for editing tables

    I was going to recommend DevExpress QuantumGrid but then you said it must be "easy to learn" so that one's out. How about Woll2Woll InfoPower? Both of these companies have been around for many, many years, with high quality products and good support for all versions of Delphi.
  11. corneliusdavid

    How to upgrade to Delphi 12?

    You don't "upgrade" the IDE, you install 12 in addition to 11.3; later, when 12 is stable and you've moved all your projects over and no longer use 11.3, then uninstall 11.3. As for the settings, it shouldn't take long to set them up--unless you select every single option to a non-default value. If there's a settings transfer tool, I don't know about it as it was never that much of a bother for me. If you customize all the colors, I'm sure you know about the IDE Theme Editor. The only time-consuming part is if you have several GetIt packages (e.g. styles or sample projects or libraries). That can take awhile--which is why I wrote AutoGetIt.
  12. While AI is not built-in to Delphi, I recently used ChatGPT to help me write a Delphi function, saving me several hours. I'm sure there's a future IDE plug-in that will incorporate this somehow. However, I agree that Delphi has fallen behind other tools--and will likely never catch up as the industry is moving faster than the small, incremental enhancements that come with each release.
  13. corneliusdavid

    Hide Status Bar in IDE

    You mean this one line?
  14. corneliusdavid

    DUnitX passed in params are confusing

    If course, if using untyped or variant parameters, but OP declared the test procedure with a specific type (Int64--I mistakenly mentioned floating point), which would not compile.
  15. corneliusdavid

    DUnitX passed in params are confusing

    I've actually wondered about this myself. Isn't the purpose of the unit test to test what happens if you get invalid parameters? So this test would be expected to fail because invalid parameters (string) were sent in to a function expecting floating point. However, I suppose it could be argued that a calling a function whose parameters require a floating point, would not even compile in Delphi if sending a string, so a unit test of this sort is pointless?
  16. corneliusdavid

    finding the share of a unc path

    Yes, that's always the case: \\server\sharename or \\server\sharename\subfolder. Note that there doesn't necessarily have to be a folder added on to that as the "sharename" part already points to a folder--the shared folder. Also, for hidden shares, the sharename will end with a "$" (at least on Windows).
  17. corneliusdavid

    Custom color not in color property list

    @Columbo, I had a few minutes and explored this technique of loading a TImageList dynamically a little more for my own curiosity and wrote a test program. The attached project loads a memory table with some local bitmaps, then as you scroll through the table, it pulls the image out of the table and clears/refreshes the image list which is associated with the page control. It should get you close to what you want. ImageListLoadTest.zip
  18. corneliusdavid

    Custom color not in color property list

    Look at the help for TImageList.Add. There's a code sample that shows how to load a selected image file from disk. You can extend that to your database by either saving out the image to a temporary file or streaming it directly to a TImage.
  19. corneliusdavid

    Custom color not in color property list

    Not with "#" but with a "$". Hex numbers in Delphi are prefixed with $. Label1.Font.Color := TColor($502F0F);
  20. corneliusdavid

    Custom color not in color property list

    For controls like TLabel and TEdit, you can use color constants defined in System.UITypes or specify your own as hex numbers; the TColor type is simply a UInt32 in the range -$7FFFFFFF-1..$7FFFFFFF. For example, both of the following lines set a label's font color to navy: Label1.Font.Color := clNavy; Label1.Font.Color := TColor($800000); The TitleBar is a special case and you have to enable custom properties for it; watch this tutorial video on Creating Custom Title Bars from DelphiCon 2021.
  21. corneliusdavid

    random between a range

    And I've probably used it sometime in the past--and forgotten about it. (*head slap*)
  22. corneliusdavid

    FireDAC Alternative

    Not sure how relevant this is or if it answers any of your questions but I switched form UniDAC to FireDAC last year. If I still used the Professional edition of Delphi, I'd still have UniDAC; if I needed Direct Oracle Access, I'd still use UniDAC. There are many other reasons to stay--this is just a short story of why I changed and what it took for my small apps.
  23. corneliusdavid

    random between a range

    Well isn't that handy? How long has that been around? Found it back to at least 10 Seattle...
  24. corneliusdavid

    Delphi 12: Install Packages inconsistency?

    That's why I changed the default Windows "open" action for .PAS files to just open them up in my text editor. I use Delphi to open projects and source files from within Delphi for programming and compiling but when just viewing something, I use a text editor. Most decent text editors (excluding Windows Notepad, of course) these days have syntax highlighting and while it may not be like what I have in Delphi, it's good enough for just looking at some code real quick.
  25. corneliusdavid

    Delphi Version in profile

    That's what I did. Then listed all of them I work with in my signature line. (Not that it really matters, of course, but I feel better more honest for declaring them.)
×