-
Content Count
267 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Jacek Laskowski
-
I suggest you report to the tracker, maybe they will do: https://github.com/cnpack/cnwizards I like this style too π
-
I've noticed a very big difference in the speed of generating hints/suggestion in Code Insight Plus and in MMX between Delphi 10.2 and 10.3. Sometimes I have to wait more than a minute to show the type or variable selection list! The same applies to MMX and editing by ctrl + E ... sometimes I waiting 2-3 minutes. Since two independent experts have the same problem, I guess the problem is in the new Delphi, specifically in OpenToolAPI. Something was broken and performance slowed down a lot. Probably only Andreas Hausladen @jbg can improve anything π
-
I came across this by accident, interesting literature π https://www.delphiclassics.com/ sorry for light offtopic π
-
Delphi 10.3.2, two different computers, a friend on the left (1), mine on the right (2). How to set line numbering in the editor as on the left screenshot (numbers on every tenth line)? I can't find this option anywhere, my friend says he has it from the beginning and doesn't know how to set it up.
-
Line numbers in code editor
Jacek Laskowski replied to Jacek Laskowski's topic in Delphi IDE and APIs
Thanks! -
Is it possible to transfer MMX settings between computers with different Delphi versions? How to do it? from Delphi 10.2 to Delphi 10.3 thanks
-
How to correctly use the MergeDataset method from TFDQuery? I have FDQuery and FDMemTable, in FDMemTable I have data copied from FDQuery: FDMem.Data: = FDQuery.Data; ...then I modify the record in FDMemTable, and then I extract the differences to a separate FDMemTable: FDMemDelta.Data := FDMem.Delta; // <--- delta to data Finally, I want to save these changes (stored in FDMemDelta as data) to the database, so I do: FDQuery.MergeDataset(FDMemDelta, TFDMergeDataMode.dmDataMerge, TFDMergeMetaMode.mmNone); and in FDQuery I see changes ... but I do not know how to force FDQuery to write this changes to the database. FDQuery.Commit - does not save anything. How commit changes to DB?
-
[FireDAC] Access to the connection object using Connection Definition Name
Jacek Laskowski posted a topic in Databases
I use private connection definition configured by Connection Definition Name. FDQuery1.ConnectionName := 'Ora_Demo'; FDQuery1.Open('select * from "Customers"'); But now I need to assigned events on FDConnection level: Connection.OnRecover := ...; Connection.OnRestored := ...; Connection.OnLost := ...; How can I do this when I have only Query and the Connection is automatically created from the connection pool? -
[FireDAC] Access to the connection object using Connection Definition Name
Jacek Laskowski replied to Jacek Laskowski's topic in Databases
Ok, I know this solution, but I search for other, without TFDConnection, I use a FireDAC connection pooling. -
I read help topis about MergeDataMode options in Firedac datasets: http://docwiki.embarcadero.com/Libraries/Tokyo/en/FireDAC.Stan.Intf.TFDMergeDataMode How is difference between dmDeltaMerge and dmDataMerge?
-
Embarcadero http server is probably installed on Marco smartphone, and sometimes it happens that Marco is out of reach of the network π
-
I installed Spring4D in IDE, after this I installed DSharp packages. All without errors. Next I tried to compile some example applications from DSharp and I get error: [dcc32 Error] DSharp.ComponentModel.Composition.SpringContainer.pas(194): E2003 Undeclared identifier: 'Kernel' Please see on screen: What is the reason for the error? Spring4D with hotfix 1.2.3 DSharp from "spring-1.2.1" branch Delphi 10.2
-
Firedac and simultaneous connection to different version of Firebird
Jacek Laskowski posted a topic in Databases
Is it possible to connect to two versions of the Firebird server (2.5 and 3) at the same time using Firedac? Both connections should use a different version of fbclient.dll, how to do it? -
Firedac and simultaneous connection to different version of Firebird
Jacek Laskowski replied to Jacek Laskowski's topic in Databases
I answer my question. Yes, it is possible to simultaneously connect to several versions of the same server. Here's the solution: http://docwiki.embarcadero.com/Libraries/Tokyo/en/FireDAC.Phys.TFDPhysDriverLink.DriverID -
Firedac and simultaneous connection to different version of Firebird
Jacek Laskowski replied to Jacek Laskowski's topic in Databases
I tried to use the library from version 3 and for now it seems to work also for connections to the 2.5 server. But I have not written anything to the base yet, only readings. But is it safe and stable? -
As you know, helpers on the one hand are a neat solution, on the other hand they are only syntactic sugar. They have a lot of restrictions, including the lack of the possibility to add fields, but ... Today, when I was writing a helper I tried something like this: program Project1; {$APPTYPE CONSOLE} {$R *.res} uses System.SysUtils; type MyInt = type Int64; MyIntHelper = record helper for MyInt private {$WRITEABLECONST ON} const fInitialized : Boolean = False; {$WRITEABLECONST OFF} protected procedure Initialize(); public function ToString(): string; end; procedure MyIntHelper.Initialize(); begin if not fInitialized then begin Self := 123456; fInitialized := True; end; end; function MyIntHelper.ToString(): string; begin Initialize; Result := IntToStr(self); end; var i : MyInt; begin try Writeln(i.ToString); Readln; except on E: Exception do Writeln(E.ClassName, ': ', E.Message); end; end. And it works π
-
Yes, of course, I was joking.
-
You destroy my day π
-
I have a class that does not have an interface, I register it and its factory in this way: TServiceLog = class; TServiceLogFactory = reference to function() : TServiceLog; Container.RegisterType<TServiceLog, TServiceLog>.PerResolve; Container.RegisterFactory<TServiceLogFactory>; pay attention to the use of PerRersolve, maybe it matters. Then I use this class in many other classes, as a parameter in the constructor, all object creation is done by Spring container: TFrameworkSMTPBus = class(TSMTPBus, IFrameworkBase, ISMTPBus) private fServiceLog: TServiceLog; public constructor Create(const aServiceLog: TServiceLog; const aSMTPClientFactory: TSMTPClientFactory); reintroduce; virtual; end; Are TServiceLog instances automatically released by Spring or should I release manually? It looks like it is released by Spring, but I have one case of memory leak, where after adding fServiceLog.Free leaked disappeared. And that's why I ask how it works underneath.
-
Spring4D and objects life cycle
Jacek Laskowski replied to Jacek Laskowski's topic in RTL and Delphi Object Pascal
I'm asking about Spring principles/rules. Because many instances of one of the classes are released by Spring and one of them is not released. I could not get to the cause. -
You mean probably Marco Cantu, not Marcu Canto π Often this man speaks about Embarcadero and RAD Studio: https://www.ideracorp.com/leadership/AtanasPopov
-
The question was simple: does RTL have functions to convert a string to JSON? There are two answers: 1. Yes, it's FunctionX function from ModuleY module 2. No, there is no such function And I asked because I did not find it, and I do not like to reinvent a wheel.
-
So... Delphi in the RTL library can't convert text to JSON... Ok.
-
[Firedac] Truncation error on Firebird select query
Jacek Laskowski replied to Jacek Laskowski's topic in Databases
No, @Dmitry Arefiev is still silent. I don't know why... -
Named pipe failure, multithreading and asynchronous I/O
Jacek Laskowski replied to FPiette's topic in Windows API
Are the pipes obsolete and not recommended?