Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 11/01/23 in all areas

  1. There have been a lot of questions in this forum about running python code in threads using Python4Delphi. I have created a comprehensive guide in this Wiki topic.
  2. pyscripter

    True thread parallelism with P4D and Python 12

    Let's not start language wars in this thread, which is about a significant development in Python 12 and how take advantage of it using P4D. P4D is about combining the strengths of python and Delphi, not choosing one versus the other.
  3. Eugine Savin

    constant records

    cCircleZero: TCircle = (C: (x: 0; y: 0); Radius: 0.0);
  4. David Heffernan

    Running python code in Delphi threads

    My recollection of Lutz's work is that Learning Python is the book of his to read. As for the Python 2 vs 3 distinction, I'd be less worried about that. That's more about syntax details than concepts. A really good work written for Python 2 is better than an average work for Python 3. The differences between 2 and 3 aren't significant conceptually.
  5. new_x

    SQLite Delphi 11 Community Edition

    Thank you for your replies. I decided to use FireDAC components and now there is no error. Best regards,
  6. pyscripter

    Running python code in Delphi threads

    Python 3 was released in 2008. I would read something more recent that is based on Python 3. pamoroso/free-python-books: Python books free to read online or download (github.com)
  7. Dave Nottage

    Macbook processor relevant?

    It matters only if you're targeting simulator, where Delphi requires the Mac to have an M1, M2 or M3
  8. Remy Lebeau

    How to free TListView Objects (String)

    I updated my answer with a 3rd option, too
  9. Dave Nottage

    Receive PUSH notifications in the background in the iOS app

    Good to hear Well, it's a solution, apparently? I assume whatever implementation you are using sends a local notification, which to my mind is unnecessary. I use Delphi's built-in FCM support, however even if the messages are not going via FCM, it should be a simple matter of subscribing to TPushRemoteNotificationMessage, e.g.: TMessageManager.DefaultManager.SubscribeToMessage(TPushRemoteNotificationMessage, PushRemoteNotificationMessageHandler); ..and in the handler: procedure TForm1.PushRemoteNotificationMessageHandler(const Sender: TObject; const M: TMessage); begin if M is TPushRemoteNotificationMessage then // Use this value (which is JSON): TPushRemoteNotificationMessage(M).Value.Notification end;
  10. Universal solution is to compare working and non-working dumps line by line. If you can't use proxy, try with Wireshark
  11. Dalija Prasnikar

    function returning interface

    I just looked at that code and the problem is not in the inline variable. Casting as interface creates hidden interface reference no matter what and that reference hinders release. This behavior is not a regression and it is not related to inline variables so I wouldn't hope it will be fixed soon. Reported as https://quality.embarcadero.com/browse/RSP-40166
  12. Dalija Prasnikar

    function returning interface

    There are two separate concerns here. First, main application code block can exhibit some weird behavior for global variables declared there, including inline variables. If you want to make proper test of some behavior, I suggest wrapping the code in additional procedure. Second, inline variables had (and maybe still have) some problems and sometimes using them does not work as expected. If you encounter an issue, usually solution is to declare local variable instead of inline. Your text case does not work correctly in 10.3.3 when code runs in main code block. If moved to the procedure, then it behaves as it should. In 10.4.2 and and 11.2 it works correctly in all scenarios, so the issue was fixed in the meantime.
  13. There is no need to uncheck those. Actually, those are still needed for supporting older Androids (unless you set minimum API to 26) Procedure would be - fill all icons you can through Project > Options > Application > Icons, then only add additional icons that cannot be set through Delphi. There is open issue requesting support for adaptive icons https://quality.embarcadero.com/browse/RSP-21335 and I attached zip with default icons resources created by Android Studio new project template. This makes it easier to see which icons need to be added manually and how they should look like.
×