-
Content Count
277 -
Joined
-
Last visited
-
Days Won
2
Everything posted by Jacek Laskowski
-
I'm updating the MMX, setting the cursor on the method, press ctrl+E and... The same thing happens when I try to enter the MMX options (menu MMX -> Properties...) I've traced that MMX looks for FontName and FontSize in the registry, in the IDE settings in the Theme subnode, if there are no FontName and FontSize, this is an exception. I don't have these settings. I've written it down and it works, but... something is wrong. Delphi 10.3
-
I don't think I've written anywhere, but with me practically 99% of classes implement the interface, so there is always an interface behind the class and problems with moving methods to the beginning of the class were ALWAYS present in classes implementing the interface. Yes: I am very happy that I will enter 2021 without this frustrating affliction Happy New Year!
-
Unfortunately, after editing many methods, the problem appeared again, so this value has no effect 😞
-
Perhaps the line width is important for this problem. I had 140, now I set 80 and for now the situation has not repeated, I will test for some time, although I want 140 eventually.
-
DynArraySetLength doesn't check for NewLength = OldLength
Jacek Laskowski replied to Mike Torrettinni's topic in RTL and Delphi Object Pascal
@jbg -
I don't use Indexer on a daily basis, but I thought I would use it because I wanted to look for many things in the code quickly. I opened its window, indexed the project and started searching. But after hovering the mouse cursor over the name in the indexer window I get AV. This is related to the hint window, as shown in the log. The error is repetitive, every hovering the cursor generates AV: [5005FD90]{rtl260.bpl } System.TObject.InheritsFrom (Line 18239, "System.pas" + 6) + $0 [134F6ABF]{mmx_bds20.dll} VirtualTrees.TBaseVirtualTree.GetDisplayRect (Line 26992, "VirtualTrees.pas" + 40) + $32 [50060298]{rtl260.bpl } System.TMonitor.CheckOwningThread (Line 19020, "System.pas" + 2) + $0 [5005FDDF]{rtl260.bpl } System.TObject.Dispatch (Line 18324, "System.pas" + 11) + $0 [50D15292]{vcl260.bpl } Vcl.Controls.TControl.WndProc (Line 7420, "Vcl.Controls.pas" + 91) + $6 [0EC92198]{CnWizards_D103R.DLL} CnWizNotifier.TCnWizNotifierServices.DoMsgHook$qqrp20System.Classes.TListt1p6HWND__rx24Winapi.Messages.TMessage (Line 1948, "CnWizNotifier.pas" + 1) + $19 [0EC9224B]{CnWizards_D103R.DLL} CnWizNotifier.TCnWizNotifierServices.DoMsgHook$qqrp20System.Classes.TListt1p6HWND__rx24Winapi.Messages.TMessage (Line 1959, "CnWizNotifier.pas" + 12) + $15 [50060079]{rtl260.bpl } System.@AfterConstruction (Line 18814, "System.pas" + 2) + $5 [50060308]{rtl260.bpl } System.TMonitor.Destroy (Line 19042, "System.pas" + 0) + $0 [5005F98D]{rtl260.bpl } System.TObject.CleanupInstance (Line 17680, "System.pas" + 37) + $0 [5005A264]{rtl260.bpl } System.@FreeMem (Line 4839, "System.pas" + 20) + $0 [5005FBE2]{rtl260.bpl } System.@IsClass (Line 17942, "System.pas" + 1) + $8 [13542CDE]{mmx_bds20.dll} MMSuperHints.TMMSuperHintWindow.GetObjectHint (Line 164, "MMSuperHints.pas" + 2) + $8 [13542BAD]{mmx_bds20.dll} MMSuperHints.TMMSuperHintWindow.GetHeaderAndDetails (Line 145, "MMSuperHints.pas" + 6) + $E [0EC91F24]{CnWizards_D103R.DLL} CnWizNotifier.TCnWizNotifierServices.AppEventNotify$qqr32Cnwiznotifier.TCnWizAppEventTypepv (Line 1854, "CnWizNotifier.pas" + 16) + $15 [13542A59]{mmx_bds20.dll} MMSuperHints.TMMSuperHintWindow.CalcHintRect (Line 113, "MMSuperHints.pas" + 1) + $10 [50ECE926]{vcl260.bpl } Vcl.AppEvnts.TMultiCaster.DoShowHint (Line 600, "Vcl.AppEvnts.pas" + 9) + $3 [50E7050C]{vcl260.bpl } Vcl.Forms.TApplication.ActivateHint (Line 11796, "Vcl.Forms.pas" + 46) + $18 [50E6FF3D]{vcl260.bpl } Vcl.Forms.TApplication.HintTimerExpired (Line 11552, "Vcl.Forms.pas" + 8) + $4 [50E6C69A]{vcl260.bpl } Vcl.Forms.HintTimerProc (Line 9191, "Vcl.Forms.pas" + 3) + $5 [50E6EC33]{vcl260.bpl } Vcl.Forms.TApplication.ProcessMessage (Line 10747, "Vcl.Forms.pas" + 23) + $1 [50E6EC76]{vcl260.bpl } Vcl.Forms.TApplication.HandleMessage (Line 10777, "Vcl.Forms.pas" + 1) + $4 [50E6EFA9]{vcl260.bpl } Vcl.Forms.TApplication.Run (Line 10915, "Vcl.Forms.pas" + 26) + $3 [0051D022]{bds.exe } bds.bds (Line 214, "" + 7) + $7
-
Issue with Indexer and VirtualTree paint
Jacek Laskowski replied to Jacek Laskowski's topic in MMX Code Explorer
Now is okey, thanks! 🙂 -
Firedac datasets have the method DestDataset.CloneCursor (SrcDataset : TFDDataset...), which clones the cursor from the dataset given as a parameter. After performing this method internally both datasets have the same buffer with records. Is there any way to reverse/cancel the result of this method, i.e. break the links to the "foreign" buffer and recreate the original cursor/buffer? I mean especially TFDMemTable.
-
Is there any way to add a lookup or calculated column to an open dataset? Normally a dataset needs to be closed, but in my case I lose data (this is TFDMemTable), so I would like to add columns on the active dataset. I will add that lookup fields are not data fields and are not included in the data buffer, so there should be some way to add them.
-
A tool to convert database files from Firebird 2.x to 3.x, in other words a database file structure converter (ODS) from version 11 to 12. An editing tool for both Windows and Linux, in the form of scripts. No need to install Firebird server! I invite you to use it. Firebird version 3 is already very mature and it is time to migrate from version 2.x 😉 https://github.com/jaclas/Firebird-ODS-11-to-12-converter
-
Adding lookup fields to active dataset, how?
Jacek Laskowski replied to Jacek Laskowski's topic in Databases
This is not the solution I am looking for, I can save and load a dataset content without such "tricks". I'm interested in ADDING a new lookup field with an ACTIVE dataset. -
I have simple table: CREATE TABLE WORKSTATION ( IDWORKSTATION INTEGER, MACHINEID VARCHAR(32) ); I create TFDQuery with simple select SQL: SELECT * FROM WORKSTATION w WHERE W.MACHINEID = :PARAM When I set as param string longer than 32 chars then I get error: "arithmetic exception, numeric overflow, or string truncation" I set StrsTrim2Len option to True: http://docwiki.embarcadero.com/Libraries/Rio/en/FireDAC.Stan.Option.TFDFormatOptions.StrsTrim2Len ...but the error still occurs. How to properly config Firedac to eliminate this problem?
-
[Firedac] Truncation error on Firebird select query
Jacek Laskowski replied to Jacek Laskowski's topic in Databases
@c0d3r I guess you write to me. Well, you're wrong. The database has declared UTF8 type for text fields. The connection is also made with the parameter UTF8. -
Once, in Delphi 10.2, I had an identical problem, the cause of which I could not trace. The problem was that the Options window (menu Tools->Options...) was blocked by an exception. To enter Options I had to use GExperts to deactivate all the experts, restart the IDE, enter Options, set what I needed, reactivate all the experts in GExperts and restart the IDE. I did not know what caused this problem. I haven't had this problem since I migrated to Delphi 10.3... until now. I just installed the Selective Debugging expert 😞 Additionally, I see that in D10.3 this exception does not appear, as it used to, every time, but sometimes. For example, a moment ago I entered the options without any problem. ps. I'm sorry to write about it here, but I don't know where it would be better to report it.
-
Selective Debugging propably has a issue
Jacek Laskowski replied to Jacek Laskowski's topic in MMX Code Explorer
I guess I was in too much of a hurry with this report. I guess that's because I was very annoyed by this mistake before. Now, after restarting the machine, the bug doesn't appear anymore, even though I have already entered the settings several times. If something happens, I will let you know. -
My custom component becomes NI>
Jacek Laskowski replied to alogrep's topic in RTL and Delphi Object Pascal
FastMM in full debug mode + properly configured .inc file -
Delphi AES encryption/decryption
Jacek Laskowski replied to Soji's topic in RTL and Delphi Object Pascal
Maybe it is worthwhile to move the 'crypto' library to a new, separate repository? In a common, large repo it is difficult for anyone to find it- 35 replies
-
- encryption
- decryption
-
(and 2 more)
Tagged with:
-
[Firedac] Truncation error on Firebird select query
Jacek Laskowski replied to Jacek Laskowski's topic in Databases
@Dmitry Arefiev Maybe now you can reply to this issue? I still fight with it. -
ANN: HTML Office Library
Jacek Laskowski replied to Alexander Sviridenkov's topic in Delphi Third-Party
$4000? Really? -
Anyone knows of a good Delphi library encapsulating Stripe payments?
Jacek Laskowski replied to Andrea Raimondi's topic in Delphi Third-Party
Imho Indy is a better option because of its popularity and versatility. And I say this even though I use mORMot myself. But of course it would be good to leave support for newer versions based on System.Net.HttpClient. This means that it is best to pack the REST client into a new class and change its implementation as needed: Indy or System.Net.HttpClient -
Range checking in library code?
Jacek Laskowski replied to Stefan Glienke's topic in Algorithms, Data Structures and Class Design
Maybe it is worth to surround the scope check by conditional directives? By default, the scope check would be enabled in debug and release, and for demanding users it would be possible to achieve maximum performance at the expense of a slightly more difficult configuration. -
I use the latest version of MMX and the problem described above still occurs sometimes. Today I noticed an additional symptom. I have two methods in class, located next to each other, the same names, but the first one is generic and inactive (marked as a comment). After editing the second one and approving both were moved to the beginning of the class:
-
Sarina DuPont, comment from 5 months ago: "10.3.3 versions of Delphi and C++ Builder Community Edition remain available for download. 10.3.3 was an excellent release and Community Edition users can perfectly well continue to work with that release. The majority of customers who need the best performance, quality and features should be able to purchase the latest release. Our paying customers deserve a premium experience. That, coupled with increased non-compliant usage of Community Edition (which we're actively addressing with our legal team), has resulted in delaying a new release of CE. Over the coming months, we'll determine when a 10.4 version of CE will be released. Regards, Sarina"
-
I have a proposal for a new functionality for MMX. It is a simple change, and for me, and I hope other users too, can be very useful. I use prefixes in the names of method parameters, I personally prefer the letters a, o and v for const, out and var parameters, respectively: procedure Somethinghing(const aInput : Integer; out oOutput : string; var vOther : string); Thanks to this, inside the body of the method, I know which parameter has which features and whether I can (var) or should (out) change it. This greatly improves code readability and error avoidance. Of course I write about myself 😉 I suggest adding a function to MMX that could be called "Forcing a parameter name prefix". Of course, the prefix (a, c and o) themselves could be set in the MMX configuration (just like the prefix for object fields). Additionally, in the configuration I would also give a checkbox "Force parameter name prefix", which would be the default value when editing the method (ctrl+E) and which could be incidentally unchecked or checked as in the picture: Using the "force prefix" option would work in such a way that if the parameter has some prefix (lowercase letters in front, before uppercase) they would be replaced, e.g. xParam -> aParam, xyParam -> aParam, and if the parameter has no prefix then it would be added, Param -> aParam Does this idea seem good to you and you would take it up?