Jump to content

Attila Kovacs

Members
  • Content Count

    1977
  • Joined

  • Last visited

  • Days Won

    26

Everything posted by Attila Kovacs

  1. Attila Kovacs

    TMemoryStream.Write

    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.
  2. While refactoring is still not perfect and does not work every time, I could improve it with turning off "View references before refactoring".
  3. 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".
  4. TArray<TItem> is TArray<T>, TArray is a class.
  5. Attila Kovacs

    MSSQL Update Freezes

    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?
  6. Attila Kovacs

    MSSQL Update Freezes

    you have to end the transaction either with commit or with rollback, so rollback comes into the except block
  7. Attila Kovacs

    ParnassusCoreEditor.dll AccessViolation

    There was a thread about it here how to rename the dlls, AFAIR @Uwe Raabe knows best.
  8. Attila Kovacs

    Konopka KSVC and Bookmarks now available for Syndey

    I'd be surprised if there was more changes than the compiler directives in the .inc file.
  9. Attila Kovacs

    Converting project from Delphi 2006 to Delphi 10.2

    it also copies all the 64 chars so the truncate trick is still needed SetString(PaperName, p, 64); PaperName := PChar(PaperName);
  10. Attila Kovacs

    Converting project from Delphi 2006 to Delphi 10.2

    @Anders Melander Wouldn't be a SetString() nicer?
  11. Attila Kovacs

    Converting project from Delphi 2006 to Delphi 10.2

    use DeviceCapabilities() instead of DeviceCapabilitiesA(), then you will also find examples
  12. Attila Kovacs

    Convert to Property

    How can I convert multiple fields to properties? It always converts the only one from the current line, where the cursor is positioned.
  13. Attila Kovacs

    Convert to Property

    @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.
  14. Attila Kovacs

    Convert to Property

    @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.
  15. 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
  16. Attila Kovacs

    RTTI in dpr / console app dpr

    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.
  17. Attila Kovacs

    RTTI in dpr / console app dpr

    found by accident
  18. Attila Kovacs

    RTTI in dpr / console app dpr

    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.
  19. Attila Kovacs

    RTTI in dpr / console app dpr

    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.
  20. Attila Kovacs

    RTTI in dpr / console app dpr

    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
  21. Attila Kovacs

    Typed constants in Delphi.

    I have to disagree, it got much better. Sorry for the interruption, please continue.
  22. Attila Kovacs

    GUI styles cause flicker on show

    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.
  23. Attila Kovacs

    ToolsApi: key boardbindings in the form editor

    Then it must be something other than Delphi.
  24. Attila Kovacs

    Revisiting TThreadedQueue and TMonitor

    I can remember. It's every time Dmitry.
×