Jump to content

Lars Fosdal

Administrators
  • Content Count

    3482
  • Joined

  • Last visited

  • Days Won

    114

Everything posted by Lars Fosdal

  1. https://larsfosdal.blog/2020/06/09/preview-any-text-file/
  2. Lars Fosdal

    How to make an "About" for a simple component?

    Why the component designer? I'd do it a bit simpler and design an About form and fetch as much as possible about the application at runtime - such as the icon from the resources, and title, version, etc from the version resource. The company and contact info could be static text, or you put it into properties on the form. The form could have a simple memo where you would put in any additional info you would want to show.
  3. I guess those also could raise issues, but being from Norway, it is rare that we have data with AM/PM. Since Windows Server 2012, Windows have insisted on yy.mm.dd hh.nn.ss for the Norwegian locale, and that has caused issues with exchanging dates as string with an MSSQL database through FireDAC. The "quick fix" that has stuck with us so far - probably because it just worked - is to change the time separator to : (colon) leading to yy.mm.dd hh:nn:ss on the application server that communicates with the database. Wherever that format is massaged within the Delphi conversions, that just works. There is a lot of relatively old code in the layers between the input and the database, so one day we may take time to figure out a better solution.
  4. We've found that date conversion problems often stem from Windows 10 using the same separator for time and date.
  5. Lars Fosdal

    Again with memory leaks and FastMM4

    Did the inherited destructor remember to call inherited?
  6. Lars Fosdal

    Your RAD Studio 10.4 Sydney issues

    Should prolly do a status summary on the issues of this thread and start a new one, but don't have time right now.
  7. Lars Fosdal

    Your RAD Studio 10.4 Sydney issues

    You can write apps for Win 7 if you take care, but the Delphi IDE itself does NOT support Windows 7.
  8. Lars Fosdal

    Unnamed types and RTTI

    Undeclared types probably do not have RTTI because it kinda pointless to be looking up an unnamed type using RTTI, since you don't have a name to look up. Besides, if you were using unnamed types in a class in production code, I'd fire you from my team.
  9. Lars Fosdal

    Meet a New EntityDAC with Support for Delphi 10.4

    @Stefan Glienke I concur.
  10. Lars Fosdal

    ParnassusCoreEditor.dll AccessViolation

    Check registry HKEY_CURRENT_USER\Software\Parnassus OU\Core Is the value of Path set to C:\Program Files (x86)\Common Files\ParnassusShared ? - if not, make it so. Copy the 20.0 DLLs there as per earlier posts.
  11. Lars Fosdal

    Meet a New EntityDAC with Support for Delphi 10.4

    "faster code with managed records" - faster in what way?
  12. Lars Fosdal

    ParnassusCoreEditor.dll AccessViolation

    10.4 does not overwrite the 10.3 versions in C:\Users\<username>\Documents\Embarcadero\Studio\20.0\CatalogRepository\ So, First install for 10.3, then install for 10.4 - and apply the fix above.
  13. Lars Fosdal

    ParnassusCoreEditor.dll AccessViolation

    10.4 has an update to Bookmarks and Navigator. It creates C:\Program Files (x86)\Common Files\ParnassusShared and places ParnassusBookmarks_XSydney.dll ParnassusCoreEditor_XSydney.dll ParnassusNavigator_XSydney.dll So, to cure the 10.3 ailments, copy from C:\Users\<username>\Documents\Embarcadero\Studio\20.0\CatalogRepository\ to the first mentioned common catalog Bookmarks-1.0\ParnassusBookmarks.dll to ParnassusBookmarks_XRio.dll ParnassusCoreEditor-1.0\ParnassusCoreEditor.dll to ParnassusCoreEditor_XRio.dll Navigator-1.0\ParnassusNavigator.dll to ParnassusNavigator_XRio.dll
  14. Lars Fosdal

    ParnassusCoreEditor.dll AccessViolation

    I can't believe they fucked it up again...
  15. Lars Fosdal

    Controlling Canon EOS cameras

    Have you tried TCamRemote from https://alkenius.no-ip.org/
  16. Lars Fosdal

    MSSQL Update Freezes

    It just dawned on me that you wrote the Monitor didn't produce any logging for that query. That strongly suggests that it fails in the preprocessing. What type are the parameters, and can there be invalid data passed to the query? Garbage strings, NaNs, invalid pointers, etc?
  17. Lars Fosdal

    MSSQL Update Freezes

    SQL Server has pretty good diagnostics and logging, so if a query causes it to hang, it should be detectable. I would suggest trying a minimal example with the explicit query through FireDAC, and compare that with the parameterized query. Check parameter by parameter that the value type is correct. That the format is correct (number, date, etc).
  18. Lars Fosdal

    TeeChart & Delphi 10.4?

    I wonder why TChart is not a GetIt thing?
  19. Lars Fosdal

    MSSQL Update Freezes

    Do you get an error if you allow it to time out when it hangs? When SQL just hangs, the cause can be a deadlock. That means that the table you are trying to update, is busy somehow. The default timeout is typically 30 seconds before a thread is declared the winner and the other threads accessing the table gets a lock error and have to do a retry. This is the reason we in our team do our MSSQL table updates through stored procedures. That allows the procedure to do a try/catch and retry if it fails due to a deadlock. Preventing deadlocks: It is important to avoid "lingering" cursors to reduce the risk of deadlocks. F.x. If you really need a cursor, do a select into a memory temp table, and create the cursor on that temp table. If a complex select or view can safely use "With NoLock" on a table, use it.
  20. Lars Fosdal

    Convert to Property

    Ah, my bad - I didn't notice the MMX context.
  21. Lars Fosdal

    Convert to Property

    In the declaration? I usually end up with a recorded macro since I only rarely want a setter procedure.
  22. Lars Fosdal

    RTTI in dpr / console app dpr

    Treat console apps like you treat VCL or FMX apps. Keep the actual code in units and have just the skeleton init and run code in the .dpr.
  23. Lars Fosdal

    Typed constants in Delphi.

    I tested in 10.3.3.
  24. Lars Fosdal

    Your RAD Studio 10.4 Sydney issues

    @Scott - Are you on subscription? In that case you can actually join the Beta testing pool and help unearth these problems. My team usually don't move to a new version until Update 1 is out.
  25. Lars Fosdal

    Typed constants in Delphi.

    Heated discussions that end well - No problem, IMO. Discussing in writing is always difficult. Differences such as cultural background and language can make it easy to trip up and come across the wrong way. As long as we are patient and try to stay positive and on the ball instead of the man - there is hope.
×