Jump to content

Brian Evans

Members
  • Content Count

    372
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Brian Evans

  1. Brian Evans

    Does "Size to grid" actually do something?

    Seems busted, does nothing here in VCL. Help says it: Changes the position and the size of the selected control so that every edge is aligned with its closest line of the design grid. Help text from toolbar descriptions here: https://docwiki.embarcadero.com/RADStudio/Athens/en/Toolbars
  2. Brian Evans

    What is this flashing message doing there?

    The Snipping Tool in Windows 11 does video in addition to static screen grabs. After triggering (SHIFT+Win+S) make sure video is selected, select the screen region you want to record then start recording.
  3. Isn't SPHTMLHelp an ancient third-party library? If I remember it added support for opening CHM help files before Delphi itself did over a decade ago.
  4. Brian Evans

    Switch from JCL to EurekaLog

    It can generate a text file per exception that contains much more than just the stack trace. You can then do whatever you want with the text file. The log viewer tool they provide can display the contents of that text file in an easy-to-read way - nicely formatted and split up. ref: https://www.eurekalog.com/help/eurekalog/bug_report_page.php
  5. Brian Evans

    Switch from JCL to EurekaLog

    Could just be logging the stacks of exceptions that are handled and logging them as part of seeing what errors users hit most often. Of limited use but have seen it done - like graying out invalid choices + hint of why on mouse over or click instead of letting the user select an item and then producing an error dialog/message latter on that users are hitting far too often.
  6. Brian Evans

    How do you shut off the Welcome Page?

    In recent releases deleting the plugin content from the layout is another approach. Use the Edit Layout at the bottom left of the Welcome page. Leaves a welcome page that loads fast and has a nice color gradient that closes when you open a project. I find the "no tabs yet" thing it puts in the middle of blank space when nothing is open more distracting than the empty welcome page with gradient.
  7. From my understanding: expressions always evaluate the same and it is the assignment operation doing type conversions when they are straightforward. That works for assignment because there is a variable on the left of a specific type and not an expression and they are never reversed. A comparison has an expression on both sides and can be reversed so type conversion on corner cases could mean A = B and B = A give different results. Better to have the programmer explicitly make each expression evaluate to the same type or at least be stricter than what happens on assignment.
  8. Brian Evans

    FireDac PostgreSQL Parameters

    Postgres limitation - no multiple statements in a prepared query (queries must be prepared if they use parameters). Note a single statement runs in a transaction anyway so the begin;/end; are not needed in the example. Most use stored procedures in the database when there is a need to execute multiple statements based off passed in parameters. Some use DO and pass in the contents of a stored procedure body as a string to run as an anonymous code block but then you can't pass in any parameters.
  9. Brian Evans

    FireDac PostgreSQL Parameters

    In Postgres BEGIN needs to be followed by a semicolon. It is equivalent to some other databases START TRANSACTION. It should be paired with a COMMIT and not END. Ref: PostgreSQL: Documentation: 17: 3.4. Transactions Single statements usually run as a transaction anyway - either the whole statement executes or none of it does. So, for a single statement your SQL would just be: update mytable set testno = testno + :increment where id = 1;
  10. Brian Evans

    FireDac PostgreSQL Parameters

    Parameters are not processed by Delphi inside string constants in SQL queries. You are using Dollar-Quoted String Constants (strings delimited by starting and ending with $$). do $$ string constant that is executed as an anonymous code block $$ Ref: PostgreSQL: Documentation: 17: 4.1. Lexical Structure
  11. Brian Evans

    FireDAC Exception handling without driver info

    That message comes from the underlying database so knowing which database is helpful in interpreting it. Seems counterproductive to be removing context from error messages.
  12. Note it is a 64-bit version of a 32-bit move function not a 64-bit move function. A 64-bit move function would have Count as: NativeInt and other changes to allow moves over the limits of a 32-bit integer.
  13. Brian Evans

    TEmbeddedWB in a 64 Bit application

    Starting with Delphi 12 they are disabled by default. What's New - RAD Studio - Disabling Floating-Point Exceptions on All Platforms
  14. Brian Evans

    Putting Delphi Application inside web page

    That has always annoyed me - step one of looking for products/solutions is to survey what is out there and compile a list with basic information. I usually just ignore/skip anything where the information is hard to come by as I have been burned too many times. Far too many companies' think their product is good for X when feature wise that would be true, but price or licensing terms make it not. I want to know that from the start not after wasting hours evaluating a product and dealing with sales calls. Most of the time 'contact sales' means the product has runtime fees, weird tiered pricing or terms making it unsuitable for a lot of scenarios.
  15. Brian Evans

    Implementing "desktops" using MDI, "broken" in D12

    Could free the forms instead of hiding. Has other issues like losing state but they can be overcome. Adding saving/loading form state is useful between program runs as well so work can be resumed quicker. MDIIssue2.zip
  16. After re-reading the post a couple of times: The poster is talking about the text on buttons in FMX.
  17. MySQL can only have one running/open query per connection. What you are seeing is normal for MySQL.
  18. Brian Evans

    Do you need an ARM64 compiler for Windows?

    There is not one executable format but two: ARM64 and ARM64EC (ARM64X PE files) on Windows 11 ARM64. The latter makes moving to ARM incrementally easier but does complicate things for third party compiler makers like Embarcadero. Bit a shit show from Microsoft over the last decade - first Windows on ARM had a new API only, then Win32 / x86 emulation and now finally a way to mix x86 and specially built ARM binaries. I think ARM will fall behind as a platform because it is fragmented and siloed. Remember how M68000 got beat by x86 - thanks to DOS and then Windows becoming a widely used platform x86 got an order of magnitude more $$$ invested into the platform. ARM just doesn't have the $$$ getting invested into platform improvements that x86 does and some of the improvements don't go to all users - like x86 emulation help on Apple M1 CPUs not available elsewhere. Contrast that to AMD's Ryzen/EPYC all using the same CPU tiles - the improvements from investment hit everything from Valve Steam Deck handhelds, Threadripper PRO workstations and the FRONTIER supercomputer.
  19. Brian Evans

    Parallelize Regex

    Results/matches are produced linearly so ForEach() has nothing to work on. You could use tasks to do the work on each match. (4. Low-level multi-threading (omnithreadlibrary.com))
  20. Brian Evans

    "Divided by zero" exception

    Consider when code using unmasked exceptions calls code in a DLL that uses masked exceptions. The floating-point control register (FPCR) needs to be set to mask exceptions just before the call then unmask them on return. The functions provided by Delphi to update the FPCR are not thread safe so they can botch it. For the non-FMX Windows platform Delphi code ran with unmasked floating-point exceptions on by default before the recent change. Most C/C++/C# code runs with them masked. This meant the above scenario happened when calling into most non-Delphi DLLs from Delphi.
  21. Brian Evans

    Why Aren't You Using SQLite?

    I started with FlashFiler then migrated to NexusDB for both standalone and C/S versions of applications. The former was available years before SQLite came on the scene and the latter was the spiritual successor of the former. Never migrated to SQLite because using C/S tooling during development of even a standalone application makes things easier. Both a database development tool like Upscene Production's Database Workbench and the application itself can access the live database tables at the same time easing debugging and other tasks. Can then ship the application with the same database engine compiled into the EXE but hooked up directly instead of through C/S components. Originally used FlashFiler as the database engine for an application + database published monthly on a CDROM. With some modifications to the source to open read-only files as shared it worked well for years. Both FlashFiler and NexusDB are royalty free so no per user fees in either standalone or C/S configurations.
  22. Brian Evans

    Possible StyledComponents/SKIA issue...

    Take a look at the Windows Sandbox, a feature available in Pro and higher of Windows 10 and 11. It provides a clean Windows environment and uses RDP behind the scenes. Useful for catching some RDP issues and missing dependencies/requirements etc. Ref: Windows Sandbo| Microsoft Learn
  23. From an organizational perspective a web server like IIS is easier to manage, especially in the long term, than individual web services running on random machines and ports. System administrators are familiar with the logging and configuration of a web server and can perform various tasks without involving the developers. For example, keeping https settings up to date by disabling weak protocols and cyphers. You don't need a web server, but it might be beneficial to consider using one.
  24. With any substantial number and sizes of files that could waste a lot of time as the whole operation keeps being restarted after each problem is encountered and fixed. I would suggest doing the copy with a tool that synchronizes directories then once everything is copied successfully delete from the source. Can even use the same tool for both steps - like robocopy to copy everything followed by a /MOVE pass to pick up any last minute changes while clearing out the source.
  25. Can also use the command line utility certutil. Supports calculating MD2 MD4 MD5 SHA1 SHA256 SHA384 and SHA512 hashes. certutil -hashfile <file> <algorithm>
×