-
Content Count
1977 -
Joined
-
Last visited
-
Days Won
26
Everything posted by Attila Kovacs
-
if (FPosition >= 0) and (Count >= 0) then also translates to if not ((FPosition >= 0) and (Count >= 0)) then goto @exitpoint; so I can't see any performance hit on Exit(). Also, I can't see any sense for any optimization in this method. Do you really need to save 1-2 CPU cycles in a stream operation? Strange.
-
Disadvantage of using defined type of TArray?
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
While refactoring is still not perfect and does not work every time, I could improve it with turning off "View references before refactoring". -
Disadvantage of using defined type of TArray?
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
I can remember the post on G+ by Stefan about the bloated .dcu's and the affected linking time, but this is the first time I see a "workaround". -
Disadvantage of using defined type of TArray?
Attila Kovacs replied to Mike Torrettinni's topic in Algorithms, Data Structures and Class Design
TArray<TItem> is TArray<T>, TArray is a class. -
http://docwiki.embarcadero.com/RADStudio/Rio/en/Managing_Transactions_(FireDAC) btw, what is the connection's transactioncount in the original "defect" code right before the update?
-
you have to end the transaction either with commit or with rollback, so rollback comes into the except block
-
ParnassusCoreEditor.dll AccessViolation
Attila Kovacs replied to bazzer747's topic in Delphi Third-Party
-
ParnassusCoreEditor.dll AccessViolation
Attila Kovacs replied to bazzer747's topic in Delphi Third-Party
There was a thread about it here how to rename the dlls, AFAIR @Uwe Raabe knows best. -
I'd be surprised if there was more changes than the compiler directives in the .inc file.
-
Converting project from Delphi 2006 to Delphi 10.2
Attila Kovacs replied to RTollison's topic in General Help
it also copies all the 64 chars so the truncate trick is still needed SetString(PaperName, p, 64); PaperName := PChar(PaperName); -
Converting project from Delphi 2006 to Delphi 10.2
Attila Kovacs replied to RTollison's topic in General Help
@Anders Melander Wouldn't be a SetString() nicer? -
Converting project from Delphi 2006 to Delphi 10.2
Attila Kovacs replied to RTollison's topic in General Help
use DeviceCapabilities() instead of DeviceCapabilitiesA(), then you will also find examples -
How can I convert multiple fields to properties? It always converts the only one from the current line, where the cursor is positioned.
-
@Uwe Raabe I see, I don't have this panel on the left, I'll just roll my own to work with selection. Thx anyway.
-
@Lars Fosdal I mean MMX Code Explorer. MMX->Conversion-> Convert to property In the dialog title is "Field(s)" but I can't get it to work with multiple fields.
-
Is that anywhere documented that RTTI is screwd up/missing on types declared in a console app's dpr? Maybe every kind of dpr. brr
-
RTTI in dpr / console app dpr
Attila Kovacs replied to Attila Kovacs's topic in RTL and Delphi Object Pascal
http://docwiki.embarcadero.com/Libraries/Rio/en/System.Rtti.TRttiType.QualifiedName "QualifiedName is only available for public types declared in the interface section of a unit." FQN makes only sense for public declarations = interface section, so no FQN for dpr members, and no lookup-table entry for those non-public types. TRealPackage.MakeTypeLookupTable makes it clear as it starts with "units := GetUnits;". At the end, we are still discussing the same what was said to me 3 days ago. -
RTTI in dpr / console app dpr
Attila Kovacs replied to Attila Kovacs's topic in RTL and Delphi Object Pascal
found by accident -
RTTI in dpr / console app dpr
Attila Kovacs replied to Attila Kovacs's topic in RTL and Delphi Object Pascal
Ignoring Mahdis corrected answer (which was actually the answer, he nailed it, even though my question was very lazy and broad) and acting like a spring, chanting the same in reply to his first comment is nothing else just trolling and does not help here. -
RTTI in dpr / console app dpr
Attila Kovacs replied to Attila Kovacs's topic in RTL and Delphi Object Pascal
There is a qualified name, the RTTI lib looks for <projectname.Type> in case of "FindType", however TRealPackage.MakeTypeLookupTable / GetUnits returning only units, not the dpr itself (it's just not in the the PPackageTypeInfo). So yes, there is RTTI but no TypeInfo. Maybe because (as you mention) the <projectname.type> is not a valid qualified name or just forgotten or because it's in the implementation section and does not belong to the PackageTypeInfo anyway (which I think is the reason). But to get a resolution to this, strictly answering my question you are right. And the answer to my problem was what Mahdi said. I could not ask better without knowing a lot of implementation detail. Thank you all. -
RTTI in dpr / console app dpr
Attila Kovacs replied to Attila Kovacs's topic in RTL and Delphi Object Pascal
The question is answered as far as I can see, Ctx.FindType(TypeName) fails on types declared in the dpr, doesn't matter what directives I put there, @Mahdi Safsafi's answer is very plausible for me, with not having interface section, no public pool for them. Not a big deal, just the usual lazy prototyping in a console dpr... thx -
Typed constants in Delphi.
Attila Kovacs replied to Mahdi Safsafi's topic in RTL and Delphi Object Pascal
I have to disagree, it got much better. Sorry for the interruption, please continue. -
You could play around with the LockWindowUpdate(Form.Handle); / LockWindowUpdate(0); and/or with the Form.Perform(WM_SETREDRAW, Winapi.Windows.wParam(LongBool(False)), 0); / Form.Perform(WM_SETREDRAW, Winapi.Windows.wParam(LongBool(True)), 0); pairs. I'm using them in OnDPIChange. It will also give a delay for showing the form.
-
ToolsApi: key boardbindings in the form editor
Attila Kovacs replied to santiago's topic in Delphi IDE and APIs
Then it must be something other than Delphi. -
Revisiting TThreadedQueue and TMonitor
Attila Kovacs replied to pyscripter's topic in RTL and Delphi Object Pascal
I can remember. It's every time Dmitry.