Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


M.Joos last won the day on February 19

M.Joos had the most liked content!

Community Reputation

25 Excellent

Technical Information

  • Delphi-Version
    Delphi 10.3 Rio

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. M.Joos

    D11 Startup problem

    Thanks for the hint - indeed, I fiddled with the migration tool - I think it's usability is very bad. I will look into it, and maybe jsut need to reinstall - haven't done much anyway.
  2. M.Joos

    D11 Startup problem

    Last week I sucessfully installed D11. Since then I continued to work with D10.4.2 until today when I tried to start up D11 again. Now I received the follwoing error: Confirming this error dialogs leads to many more with similar messages: D11 is trying to load D10.4.2 packages. Does anybody have any good idea why this happens?
  3. From an old blog post from Allen Bauer (https://blog.therealoracleatdelphi.com/2009/09/: " All eligible class constructors and class destructors are invoked in sequence with unit initialization and finalization, respectively. If a given class constructor or destructor is eligible to be invoked (ie. it was linked into your application), it will run immediately before the initialization section for the unit in which the class is implemented. The class destructors will be invoked immediately after the finalization section for the unit in which the class is implemented. Class constructors in a given unit are generally invoked in the same order of declaration, except in cases described below. Class destructors are invoked in reverse order from the class constructors. For an ancestor class declared in the same unit, its class constructor will be invoked before the descendant class constructor and the class destructor is invoked after the descendant class destructor. If the implementation of given class constructor references another class in the same unit with a class constructor, the referenced class’ class constructor will be invoked before the current class’ class constructor. If the references are cyclic (ie. they reference each other in their class constructors), then they are invoked in reverse order of declaration. This means that there can be cases where a class constructor can reference an “unconstructed” class. Ancestor classes from external units used in the interface section are guaranteed to already have their class constructors run prior to any class constructors on descendant classes within the current unit. Unit cycles can break down the deterministic nature of the above rules in the same manner as unit initialization and finalization. However, for a given unit, it is guaranteed that all the class constructors declared within in it will have already run immediately before the initialization section runs. Congruent to this rule is that it is guaranteed that all the class destructors will run immediately after the finalization section. Dynamically loaded packages, using LoadPackage. Because there is no way to know exactly which classes are going to be used, just like there is no way to know which units are going to be used, all class constructors and destructors along with all unit initialization and finalizations are invoked according to the above rules. Other rules about their use are: You do not have to declare a class destructor if you declare a class constructor, and vice versa. They cannot be virtual, dynamic or message. They cannot be explicitly called. They cannot have any parameters. They do not have to be called Create and Destroy. (ie. Init and Fini are equally valid names). With this implementation, it was easier to leverage the same table that the compiler creates for unit initialization and finalization. It satisfies this requirement: “Called automatically to initialize the class before the first instance is created or any static members are referenced.” Issues with cycles are also clearly warned against in VB.NET and C#: “Avoid circular references in Shared … since it is generally impossible to determine the order in which classes containing such references are loaded.” Another benefit is that since it is running during the initialization/finalization phases, any threading implications are no different than the existing rules regarding unit initialization and finalization." What we don't know is, if the compiler behavoiur has changed since then.
  4. Indeed, this is then called "false sharing" and is very well explained from Microsoft's C++ Herb Sutter with an overview here: https://herbsutter.com/2009/05/15/effective-concurrency-eliminate-false-sharing/
  5. M.Joos

    QueryPerformanceCounter precision

    For those of you who really wabt to dive deep into timing on Windows I can highly recommend this project with lots of background information: http://www.windowstimestamp.com/
  6. For inspiration you may also look into this excellent answer from Uwe Raabe on Stackoverflow on a related question: https://stackoverflow.com/questions/47347578/manually-skip-a-component-from-being-created-from-the-dfm which also shows a hacky way to prevent components from getting created. I guess Uwe wasn't aware of his answer more than 3 years ago 😉 As for loading the dfm from the resource that's in the executable have a look at http://docwiki.embarcadero.com/Libraries/Sydney/de/System.Classes.TStream.ReadComponentRes
  7. I guess it is theoretically possible to shoehorn Delphi's streaming mechanism to do what you want. Essentially you could just reread your form with an adjusted TReader. Specifically you would not want for the components to be recreated. Have a look at the TReader events, specifically TReader.OnCreateComponent One problem though is how to "skip" rereading of components as you want to only select a number of components.
  8. In a similar vein, @Eric Grange saved my last week with his SamplingProfiler (https://www.delphitools.info/samplingprofiler/). A good example of a KISS tool - just the right amount of information needed, and really simple to use. So a big thanks from me to Eric Grange.
  9. M.Joos

    Using ClientDataSets

    Have a look here: This is a talk from Cary Jensen about nested ClientDataSets - the same author you have that excellent book from.
  10. M.Joos

    full screen view capture

    Unfortunately this is for Windows only - The OP is interested in something for Android if you look at the screenshot in his post.
  11. If the stream of data is a mix of characters and binary data I would strongly recommend not using string to hold the data. A (unicode) string should only be used for character data otherwise you can expect a lot of unforeseeable surprises.
  12. About DWscript: You said it is not cross-platform yet , does that mean that someone is already working on making it cross platform? And what is it that makes it so Windows specific?
  13. Strange, double clicking on the editor tabs closes the tab in my setup - I wonder if any of GExperts / CNPack catches the double click and does the closing?
  14. For those of you who are more interested about the differences in class vs. interface inheritance, here is a transcript from several live chats with the founders of Delphi: http://edn.embarcadero.com/article/20384 For those that don't want to read all (but it intersting anyway) here is the gist from Chuck Jazdzewski :
  15. M.Joos

    Your RAD Studio 10.4 Sydney issues

    I found another fork, just for the Liveblame feature I was looking for: https://github.com/MJSt/DelphiVersionInsight It was a peace of a cake updating that one. And it seems to work in 10.4 as well.