Jump to content

Cristian Peța

Members
  • Content Count

    412
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Cristian Peța

  1. It is easily to generate MD5 with some tool like Notepad++.
  2. Cristian Peța

    DataSnap connection problem

    Try to add MidasLib unit in the projects uses clause. Maybe the cause is an old midas.dll
  3. Cristian Peța

    How do I return to the 'Constructor'??

    After you created the form and want to have only one form you can not return to the code into the constructor without creating an other form.
  4. Cristian Peța

    How do I return to the 'Constructor'??

    If you create only one form and want to keep it to change the table the I ask myself as Remy asked: why is that code in the constructor? Also calling Abort into the constructor will destroy the form.
  5. This happens also when you build you package? Usually this happens at compile but not at build. If build was successful then try install again.
  6. Cristian Peța

    ifthen strange return value !

    Compiler generated code can tell you if a variable is automatically initialized or not. I only wanted to point out that there is a method to check if an AI statement in this regard is true or not.
  7. Cristian Peța

    ifthen strange return value !

    I apologize, now that I read again was I wrote... but it was not my intention.
  8. Cristian Peța

    ifthen strange return value !

    Assembler of that code will show the truth... but I think that someone that ask such things do not have ability to read assembler.
  9. Cristian Peța

    ifthen strange return value !

    Not. The best practice is to initialize to nil if you need this. Because there was something before and that memory was deallocated. It doesn't have anything with object allocation. You can allocate the memory for an object and you variable will remain as it was. var LObj: TObject; begin TMyClass.Create; //LObj is not changed and will contain garbage Only if you pass the value of the object to the variable: LObj := TMyClass.Create; Not. Declaration will only allocate the memory for the variable (a typed pointer in this case) and that memory will contain garbage.
  10. Cristian Peța

    Each .py script in a separate window

    About emNewInterpreterOwnGIL. Not every script can run with this. There are limitations. https://github.com/pyscripter/python4delphi/discussions/442
  11. Cristian Peța

    Each .py script in a separate window

    You can run 10 instances with Python4Delphi but you have GIL limitation because Python. Python limits you, not Python4Delphi. Is there a library in this word that can circumvent GIL? You can use CreateProcess and run 10 processes. You don't need Python4Delphi for this. But in the same processes you are limited by GIL. And all this because Python, not Python4Delphi. Is Python a bad and low quality implementation of the language because this?
  12. Cristian Peța

    Each .py script in a separate window

    When you start 10 console windows you are starting 10 processes. With Python4Delphi you will start all 10 in the same process. In this way you are limited by GIL. You can start from a Delphi app 10 process executing same Python script but not using Python4Delphi. Python4Delphi runs in your process and so you have a lot of advantages but also GIL. PS. You can start at the same time 10 Delphi app and you will have 10 Python scripts running from Python4Delphi at the same time without GIL limitation.
  13. RSP-30732 is marked as fixed in 10.4.2. Can you reproduce it with the sample from that RSP? If you can reproduce it in 12.1 you should open a new request at https://qp.embarcadero.com/
  14. Cristian Peța

    Each .py script in a separate window

    Yes, syntactically they are correct but I don't bother to read a code without indentations.
  15. Cristian Peța

    Each .py script in a separate window

    I don't have an answer but you code is so hard to read because wrong indentation that some will not bother to read you code and answer. I understand that Pascal syntax is permissive but do you write your code in Python also with wrong indentation? And it works?
  16. TClientDataSet is pretty fast. Faster than FireDAC. You should reduce filtering and sorting if this is a bottleneck. Consider using CloneCursor if you need same sorting or filtering many times. But first: use a profiler!
  17. You can use something like EurekaLog or madExcept to get a call stack. Also you can use, while debugging, the address from the message in the CPU view in the context menu "Go to Addresses" and see if that is in your code. If not, then you need a call stack.
  18. Cristian Peța

    REST api: too much data

    I do not understand the problem. It is processed automatically but too slow or do you work manually? What do you try to solve?
  19. Cristian Peța

    Variable might not have been initialized

    This should be easily spotted with a source control.
  20. Now I see that stdcall will force to put on stack the reference to TSystemTime. Without stdcall the reference will be passed in EAX registry. Maybe D7 is not using EAX and will put the reference on stack also without stdcall.
  21. Strange how it worked in D7. Maybe the garbage on the stack was useful. With stdcall TSystemTime will be passed as value directly on the stack. Without stdcall TSystemTime will be passed as reference. Do I'm missing something? https://docwiki.embarcadero.com/RADStudio/Sydney/en/Program_Control_(Delphi)
  22. Are you sure DDetours is not working? Have you tried to trace into Now() to debug and see what GetLocalTime(SystemTime) is returning in SystemTime? And to see actually where the exception is raised?
  23. Cristian Peța

    D12 suddenly changes made in design do not take in runtime

    But it is into dfm? Do you see it at design time or only at runtime is missing?
  24. Cristian Peța

    D12 suddenly changes made in design do not take in runtime

    If you put a break-point on that line with ShowMessage it will stop? If yes... step into and see what next.
  25. Cristian Peța

    how to delete TFDTable after open

    This is working for me. Probably you are doing something else in your code. program Project1; {$APPTYPE CONSOLE} uses System.SysUtils, System.Variants, System.Classes, FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Error, FireDAC.UI.Intf, FireDAC.Phys.Intf, FireDAC.Stan.Def, FireDAC.Stan.Pool, FireDAC.Stan.Async, FireDAC.Phys, FireDAC.Phys.SQLite, FireDAC.Phys.SQLiteDef, FireDAC.Stan.ExprFuncs, FireDAC.VCLUI.Wait, FireDAC.Stan.Param, FireDAC.DatS, FireDAC.DApt.Intf, FireDAC.DApt, FireDAC.Phys.SQLiteWrapper.Stat, Data.DB, FireDAC.Comp.DataSet, FireDAC.Comp.Client; var FDConnection1: TFDConnection; FDTable1: TFDTable; begin FDConnection1 := TFDConnection.Create(nil); FDTable1 := TFDTable.Create(nil); FDConnection1.DriverName := 'SQLite'; FDConnection1.Params.Database := ExtractFilePath(ParamStr(0)) + 'test.db'; FDTable1.Connection := FDConnection1; FDTable1.TableName := 'table1'; //Default FDConnection1.Params.Values['LockingMode'] is 'Exclusive' FDConnection1.Open; FDConnection1.ExecSQL('CREATE TABLE table1 (a INTEGER)'); FDTable1.Open; FDTable1.InsertRecord([10]); FDTable1.Close; DeleteFile(FDConnection1.Params.Database);//here is not working because LockingMode = Exclusive FDConnection1.Close; DeleteFile(FDConnection1.Params.Database);//here is working for me end.
×