-
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 ExcellentTechnical Information
-
Delphi-Version
Delphi 11 Alexandria
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
-
Google Signin Firebase for Store doesn't work
Dalija Prasnikar replied to Massimiliano S's topic in Cross-platform
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 -
tParallelArray and interfaces
Dalija Prasnikar replied to A.M. Hoornweg's topic in RTL and Delphi Object Pascal
It compiles for me... but after adding missing quotes in interface GUID declaration. TParallelArray is not the problem here. -
Do you need an ARM64 compiler for Windows?
Dalija Prasnikar replied to Lars Fosdal's topic in Cross-platform
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. -
Do you need an ARM64 compiler for Windows?
Dalija Prasnikar replied to Lars Fosdal's topic in Cross-platform
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 -
AI can't even count properly. Why would it be able to know whether number is prime or not?
-
Simulate blocking mode to send Email
Dalija Prasnikar replied to Berocoder's topic in Network, Cloud and Web
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. -
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.
-
Creating forms and running animation are all tasks that need to run in the main thread. Adding background threads would not help here.
-
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.
-
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.
-
"Divided by zero" exception
Dalija Prasnikar replied to Mohammad Atikur Rhaman's topic in General Help
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/ -
Delphi bug reports or feature requests to "vote"/comment for (important, fatal etc)/
Dalija Prasnikar replied to Tommi Prami's topic in Delphi IDE and APIs
Thanks, that helps and your issue is accessible now. -
Delphi bug reports or feature requests to "vote"/comment for (important, fatal etc)/
Dalija Prasnikar replied to Tommi Prami's topic in Delphi IDE and APIs
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 -
Delphi bug reports or feature requests to "vote"/comment for (important, fatal etc)/
Dalija Prasnikar replied to Tommi Prami's topic in Delphi IDE and APIs
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. -
Gaining access to private class vars of an implementation class
Dalija Prasnikar replied to Eric Grange's topic in RTL and Delphi Object Pascal
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.