-
Content Count
412 -
Joined
-
Last visited
-
Days Won
5
Everything posted by Cristian Peța
-
Which version is applicable to receive Delphi updates and upgrade versions?
Cristian Peța replied to JohnLM's topic in Delphi IDE and APIs
It is easily to generate MD5 with some tool like Notepad++. -
Try to add MidasLib unit in the projects uses clause. Maybe the cause is an old midas.dll
-
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.
-
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.
-
[dcc32 Fatal Error] F2084 Internal Error: AV50ECCF6F(50E50000)-R3C4F6564-0
Cristian Peța replied to dmitrybv's topic in Delphi IDE and APIs
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. -
ifthen strange return value !
Cristian Peța replied to bravesofts's topic in Algorithms, Data Structures and Class Design
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. -
ifthen strange return value !
Cristian Peța replied to bravesofts's topic in Algorithms, Data Structures and Class Design
I apologize, now that I read again was I wrote... but it was not my intention. -
ifthen strange return value !
Cristian Peța replied to bravesofts's topic in Algorithms, Data Structures and Class Design
Assembler of that code will show the truth... but I think that someone that ask such things do not have ability to read assembler. -
ifthen strange return value !
Cristian Peța replied to bravesofts's topic in Algorithms, Data Structures and Class Design
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. -
About emNewInterpreterOwnGIL. Not every script can run with this. There are limitations. https://github.com/pyscripter/python4delphi/discussions/442
-
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?
-
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.
-
REST Authentication issue on FMX Windows: Error querying headers (12019): The handle is in the wrong state for the requested operation
Cristian Peța replied to Alex40's topic in FMX
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/ -
Yes, syntactically they are correct but I don't bother to read a code without indentations.
-
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?
-
Looking for Advice on Improving the Performance of Delphi Applications
Cristian Peța replied to Andro12's topic in Tips / Blogs / Tutorials / Videos
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! -
Access violation errors while running without the debugger
Cristian Peța replied to christos papapostolou's topic in Algorithms, Data Structures and Class Design
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. -
I do not understand the problem. It is processed automatically but too slow or do you work manually? What do you try to solve?
-
Variable might not have been initialized
Cristian Peța replied to shineworld's topic in Delphi IDE and APIs
This should be easily spotted with a source control. -
Changes in System.sysutils.pas were not reflecting in other unit in Delphi 11
Cristian Peța replied to sp0987's topic in General Help
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. -
Changes in System.sysutils.pas were not reflecting in other unit in Delphi 11
Cristian Peța replied to sp0987's topic in General Help
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) -
Changes in System.sysutils.pas were not reflecting in other unit in Delphi 11
Cristian Peța replied to sp0987's topic in General Help
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? -
D12 suddenly changes made in design do not take in runtime
Cristian Peța replied to Fudley's topic in FMX
But it is into dfm? Do you see it at design time or only at runtime is missing? -
D12 suddenly changes made in design do not take in runtime
Cristian Peța replied to Fudley's topic in FMX
If you put a break-point on that line with ShowMessage it will stop? If yes... step into and see what next. -
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.