Jump to content

JonRobertson

Members
  • Content Count

    289
  • Joined

  • Last visited

  • Days Won

    7

Posts posted by JonRobertson


  1. That sounds like much more code than necessary to me.

     

    I have a base form with a TDataSet field named StateDataSet and a virtual method called UpdateUIState. Each derived form assigns StateDataSet during FormCreate and overrides UpdateUIState to update the UI based on various conditions, such as TDataSet.State and user security for that form/data. Both the base form and the derived user form is "aware" of the record operation (view, insert, edit) by looking at StateDataSet.State. Every form has a ValidateForm method to ensure that required fields are provided and any referring data is valid before the record is posted.

     

    I avoid writing anything to the database unnecessarily. Adding a row temporarily that will be removed if the edit is canceled is wasteful network and disk I/O as well as increasing db index and page fragmentation. Some customers now use a "cloud hosted" database server, so database read/writes also have extra latency. Doing as much as possible in memory is a huge performance gain.

     

    I find it much easier to maintain a single form (per table/record). I don't have to take the time to update two or three forms when changes are needed and ensure that the implementation is consistent across multiple forms/units.

     

    FWIW, my data edit forms have a lot of common functionality that is implemented in the base form, not just StateDataSet and UpdateUIState.

    • Like 2

  2. I wouldn't use a separate flag unless necessary. If you are using a TDataSet descendent, you can look at the State property to determine whether the record is being inserted (State = dsInsert) or edited (State = dsEdit). If it is necessary to call Post in code, you can use if ds.State in dsEditModes to determine if the current record needs to be posted.

    • Like 2

  3. Does anyone know how to use reFind to remove a property for a specific component in a DFM? For example, remove BorderStyle from only TMemo components?

     

    I have tried #remove TMemo:BorderStyle but that does not work for me the way #migrate TMemo:BorderStyle does. I have tried a few other things, but either no BorderStyle property values are removed or all of them are.

     

    Thanks


  4. 2 minutes ago, Al T said:

    Microsoft needs to pay bills too, yet they can continue to support the whole version you bought with bug fixes and security patches!

    I don't understand why anyone would compare Microsoft's business motives to Embarcadero's.

     

    Microsoft's bottom line is based on the success of their platforms (Windows, SQL Server, Office 365, Azure, ad nauseam). They could give Visual Studio Enterprise to every interested developer for free and not need to worry about paying the bills. Or their Visual Studio development team's salaries.

     

    Embarcadero's bottom line is based on the success of development tools and Interbase. They don't spend resources on Delphi and C++ Builder so they can profit from an operating system or hardware platform.


  5. 1 hour ago, David Hoyle said:

    I found my IDE became more stable after disabling all the Parnassus plugins.

    When I initially installed Delphi 11.0, I went through GetIt and installed several items, including the Parnassus Bookmark and Threaded Debugging plugins. For the next couple of months, the Delphi IDE was more unstable than any previous version. It was bad enough that I emailed my account rep and she arranged an online call.

     

    The short version is that once I uninstalled both Parnassus plugins, exceptions stopped occurring in the IDE. I occasionally see one today, but that is typically after having an instance of the IDE open for several hours using the debugger heavily.

    • Like 1
    • Thanks 1

  6. My favorite versions, which has a lot to do with stability, were Delphi 3, 6, and XE2. At a prior position, the company stayed on Delphi 6 for 9 years. Delphi 7 didn't have any benefit for us and then Borland chased the white rabbit down the .NET path... We started migrating with Delphi 2009 but did not have a stable release candidate until Delphi XE2. That was primarily due to switching our product from DCOM DataSnap to dbExpress DataSnap.

     

    On 6/1/2024 at 5:24 AM, Dalija Prasnikar said:

    I had zero problems with Delphi 7 in modern environment. I still have it installed on Win 10. Works like it always did.

    Same here. I currently maintain a few apps that are Delphi 7 projects, and most will likely not be migrated to a newer Delphi. I use Delphi 7 in Windows 10, sometimes several hours a week. Although being used to the functionality of newer IDEs, I get frustrated at the difference in productivity using Delphi 7.


  7. 1 hour ago, corneliusdavid said:

    I'm a subscriber, too, and find it incredulous that I keep getting emails from "my representative" (as if I need one) about learning about the new version and would I like a demo.

    Same here. I brought this up with Ian Barker and my assigned rep.

     

    1 hour ago, corneliusdavid said:

    why doesn't the marketing department have a list of current paying customers?

    I asked that as well. :classic_huh:

     

    1 hour ago, corneliusdavid said:

    I got an apology back with a note that "marketing will be updated."

    Yep. Wash, rinse, spin, dry, repeat. But wait, those clothes just came out of the dryer...

     

    It helped for a little while. But I am back to receiving multiple "upgrade" or "renew" email offers every week, sometimes multiple times in one day. And our licenses do not expire until February, 2026. :classic_angry:

     

    But the ones that I find most frustrating are the "personal" emails asking if I'd like a demo of the development tool that has been my tool of choice since 1996.

     

    • Like 3

  8. 23 hours ago, Navid Madani said:

    Navigator, Bookmarks

    Just my experience, I had major issues with IDE instability when I started using Delphi 11. I had a call with one of the product managers and showed the issues that I was having. His suggestion was to remove packages and add-ins to find the cause, which I had been too lazy to do at that point. :classic_sad:

     

    Once I removed Navigator and Bookmarks, all of the IDE instability disappeared and I've rarely had an issue since.


  9. This is a stretch, but you could extract the manifest from your bds.exe and verify that the manifest is not requiring elevation. The link has a sample command-line, which I just used on my bds.exe. If you have Visual Studio installed, mt.exe should already be on your machine. I don't know if there is a way to get it that is simpler than installing the Microsoft Windows SDK.

     

    I can't imagine this is the cause with a standard install. But there is something triggering the request. The manifest should contain this line:

    <requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>

     


  10. 2 minutes ago, JonRobertson said:

    Installing the package will require Delphi to call Register. I doubt that Delphi calls Register every time it loads a package.

    You could try an alternative to Lajos' suggestion. Manually launch a second instance of Delphi, and then use Run->Attach to Process to attach to the first. You will want to check Task Manager before launching the second instance, to get the PID of the first. You will see both instances in the Attach to Process dialog.


  11. Installing the package will require Delphi to call Register. I doubt that Delphi calls Register every time it loads a package.

     

    @Dave Craggs Since you are building, do you have source for all of the components in the package? You could add OutputDebugString logging to the Register procedure as a start, to narrow down the component causing the AV.


  12. Have you tried launching BDS with a different registry key? This would not load components installed after the IDE was installed. In my tests, experts and add-ins are still loaded. For example:

    bds -r"clean"

    I wonder if there is something else (such as a DLL) being loaded by the IDE that is triggering the elevation requirement. Using Process Monitor could be helpful to track what BDS is doing before the elevation dialog appears.

    • Like 1

  13. Either the error you posted is not a true copy of the error message or something is wrong in your DPROJ. There are no "vcl.dcp.vcl.*" files in the Releases folder or any other folder under Embarcadero\Studio\...

     

    My suspicion is that you are building a project for 64-bit and the compiler is finding a DCU previously built for 32-bit. If the unit's source has not changed, the compiler will not rebuild the DCU even though the DCU was built for a different platform. I wish the compiler dealt with this better.

     

    The first thing to try is Project->Build (Alt-P then B, or Shift-F9 should also work).

     

    If you still get a similar error, post the error message again and your DPROJ file, if possible.


  14. 12 hours ago, Die Holländer said:

    procedure Encrypt(sr: PAnsiChar; key: PAnsiChar; var encryptedText: PAnsiChar); stdcall; external 'YourDLLName.dll';

    procedure Decrypt(sr: PAnsiChar; key: PAnsiChar; var decryptedText: PAnsiChar); stdcall; external 'YourDLLName.dll';

    That would work for a DLL that contains native code and uses ANSI char based null-terminated strings.

     

    The code posted is C# code, using a .NET System.String class "Representing text as a sequence of UTF-16 code units"

     

    The DLL generated will be a .NET assembly containing managed code, not native code. As Peter mentioned earlier, either the DLL has to be written & compiled to support COM interop

    https://blogs.embarcadero.com/using-a-net-assembly-via-com-in-delphi/

    https://www.blong.com/Conferences/BorCon2004/Interop2/COMNetInterop.htm#CCW

     

    or the Delphi application that loads the DLL has to host the CLR before the DLL is loaded.

    https://stackoverflow.com/questions/2048540/hosting-clr-in-delphi-with-without-jcl-example

    https://stackoverflow.com/questions/258875/hosting-the-net-runtime-in-a-delphi-program

    https://en.delphipraxis.net/topic/1744-net-runtime-library-for-delphi/

    https://adamjohnston.me/delphi-dotnet-interop-with-jvcl/

     

    "Explain step by step" isn't possible, as there are a lot of factors to consider. I suspect this is why there are commercial libraries that do this.

    https://www.remobjects.com/hydra/

    https://www.crystalnet-tech.com/

    https://www.atozed.com/crosstalk/

    There was a library called Managed-VCL, which can be found online. But the website vanished a while back.

     


  15. On 4/24/2024 at 4:10 AM, Alexander Sviridenkov said:

    Release is expected in May and will be included in HTML Library bundle

    You have a couple of "bundles". Do you mean the three library bundle?

    Quote

    Bundle (HTML Component Library + HTML Editor Library + HTML Report Library)

    I'm curious as a potential customer.


  16. 1 minute ago, David Heffernan said:

    This is a strange post. The issue with multiple languages is the mix of zero based and one based indexing.

    Different languages have different rules and syntax. Is that really an issue?

     

    I see the "issue" as developers using the incorrect syntax for the language they are currently using.

     

    If I toured Italy, I imagine my trip would be more enjoyable if I spoke Italian. Which I don't. :classic_ohmy:

Ă—