Jump to content

Dalija Prasnikar

Members
  • Content Count

    1109
  • Joined

  • Last visited

  • Days Won

    95

Dalija Prasnikar last won the day on August 14

Dalija Prasnikar had the most liked content!

Community Reputation

1393 Excellent

Technical Information

  • Delphi-Version
    Delphi 11 Alexandria

Recent Profile Visitors

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

  1. Dalija Prasnikar

    Google Signin Firebase for Store doesn't work

    If you are using App Bundles and Play Store Signing, then you need to add SHA-1 fingerprint from the Google Play Console as Google will use different certificate for signing from the ones in your keystores. See: https://developers.google.com/android/guides/client-auth
  2. Dalija Prasnikar

    tParallelArray and interfaces

    It compiles for me... but after adding missing quotes in interface GUID declaration. TParallelArray is not the problem here.
  3. Dalija Prasnikar

    Do you need an ARM64 compiler for Windows?

    Just the fact that the code has been working for over 25 years means that it will have very little issues when it comes to exception handling. Only hardware exceptions are the problem, which for VCL means mostly dereferencing nil and dangling pointers and floating point exceptions (which are now masked by default). I doubt that there are many places in VCL that would need code changes for exception handling.
  4. Dalija Prasnikar

    Do you need an ARM64 compiler for Windows?

    Since there is already plenty of low level RTL code that runs with LLVM based compilers, the only part where those exceptions could cause issues is VCL. I would say that this is probably less of a problem than it may look like on the first sight. Developing Windows ARM compiler is much simpler than 64-bit IDE
  5. Dalija Prasnikar

    String memory usage

    AI can't even count properly. Why would it be able to know whether number is prime or not?
  6. Dalija Prasnikar

    Simulate blocking mode to send Email

    CheckSynchronize must be called from main thread, just like Application.ProcessMessages. If the issue is that background thread is calling TThread.Synchronize or Tthread.Queue, then CheckSynchronize must work. If it doesn't work then the problem is in something else. I don't use FNC components so I cannot say what the actual issue is.
  7. Dalija Prasnikar

    SplashForm freeze

    I misinterpreted your post. However, if you do that, then you must not call Free on SplashForm, but FreeAndNil and then check whether it is nil before calling Close. You could also just call FreeandNil in the MainForm.Show event as releasing the form would also free it. OnShow event can be triggered more than once and freeing the form without niling the reference would mean that you are accessing dangling pointer which can crash your application. FreeAndNil can be safely called on nil reference so you wouldn't have issues with that.
  8. Dalija Prasnikar

    SplashForm freeze

    Creating forms and running animation are all tasks that need to run in the main thread. Adding background threads would not help here.
  9. Dalija Prasnikar

    SplashForm freeze

    If the form is not completely painted, then you should call Application.ProcessMessages. The need to have that can depend on the controls and code you have on the splash form. Animation will depend on message processing, so using animation in splash form is not advisable. (I missed that part in your initial post). If you insist on having animation, then you would have to call Application.ProcessMessages more frequently, like @DJSox proposed, but the animation might not be smooth depending on how much time is needed for constructing each form. Calling MainForm.Free (or Close depending on the code) will destroy the main form. Not to mention that even closing in OnShow would prevent main form from becoming visible, so this is not something you should be doing at all. It does not serve any purpose.
  10. Dalija Prasnikar

    SplashForm freeze

    Your problems is that you are trying to show splash form after all other forms are created. You should show it immediately upon construction. BEGIN Application.Initialize; Application.Title:= 'My Slow App'; FormSplash:= TFormSplash.Create(Application); FormSplash.Show; Application.CreateForm(TFormMain, FormMain); Application.CreateForm(TForm2, Form2); Application.CreateForm(TForm3, Form3); Application.CreateForm(TForm4, Form4); Application.CreateForm(TForm5, Form5); FormSplash.Free; // FormSplash is no longer needed Application.Run; END. There is also no point in having empty try...finally block, it serves no purpose. If construction of any of the forms fails, the application will just terminate. You could add some error handling in such case, but that is another story. You should not use FormSplash variable anywhere else after you call Free on it as it will be a dangling pointer. That should not be too much of an issue since it is only a splash form and it is not supposed to be used anywhere else. Otherwise you would have to use FreeAndNil(FormSplash) to be sure that reference is niled when object is gone and the variable is still accessible to other code.
  11. Dalija Prasnikar

    "Divided by zero" exception

    C++, Swift to name some. Interoperability with code written in other languages (although this is not a language issue per-se) was one of the main reasons why exceptions are masked now, as such code would commonly expect masked exceptions. So you had to do mask/unmask at every call to such code which then caused issues in threading as Delphi FPCR functions were not thread-safe at all. For instance: https://stackoverflow.com/q/9472265/
  12. Thanks, that helps and your issue is accessible now.
  13. I don't know if you can change that now, but when posting issue you need to use Share with Embarcadero customers to make it visible to others. See https://dalijap.blogspot.com/2024/04/delphi-121-new-quality-portal-released.html
  14. No. Please don't post existing bug reports to the new tracker as they already exist in the internal tracking system and doing so duplicates the issues and only creates more unnecessary work. Also ne tracking system does not support voting. There are zero benefits for anyone involved.
  15. The problem is that Embarcadero provides base framework classes that satisfy very narrow usage and are not properly open for extension. Sometimes you need to change literally one line, to get the needed behavior, but there is no way to do that properly. So you need to resort to hacking into those classes. Protected opens up the class for needed extensions and still protects casual users from using implementation details and does not break encapsulation. Yes, if the implementation changes, you may need to update your code to match the changes, but you would need to do that regardless. Private is major PITA.
×