Jump to content

Stefan Glienke

  • Content Count

  • Joined

  • Last visited

  • Days Won


Stefan Glienke last won the day on January 23

Stefan Glienke had the most liked content!

Community Reputation

470 Excellent


Technical Information

  • Delphi-Version
    Delphi 10.1 Berlin

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Stefan Glienke

    Why can't I install this monospaced font in Delphi ?

    Version 1.0.1 now properly identifies as monospace.
  2. Stefan Glienke

    Null value for T

    In C# there is no Nullable<T> where T is a reference type (because the declaration is like this: public struct Nullable<T> where T : struct) unless you are using C# 8 and have enabled nullable reference types - and then there still is no Nullable<T> for any T that is not a struct but the compiler prevents null in a reference type unless you specify it as nullable. I am pretty much sure that if we ever get nullables in Delphi they don't implement such a feature as C# 8 does to prevent null/nil in reference types.
  3. Stefan Glienke

    Null value for T

    Sure, write your own compiler
  4. Stefan Glienke

    Null value for T

    It's a "magic" function implemented by the compiler without code in System.pas
  5. Stefan Glienke

    Why can't I install this monospaced font in Delphi ?

    It doesn't matter - they all look terrible in the Delphi IDE on High DPI
  6. I was not talking about making classes for UI controls but exposing your dataobjects in a way that you can bind them in some way to the UI. Personally I don't like LiveBindings that much - and I gave up on some MVVM-ish approach for Delphi. What works kinda well is going the DB aware approach with datasets (can use things like the TObjectDataSet from Spring4D or other similar ones - DevArt for example has also one) that just are adapters to non dataset/database data such as lists of objects. There are other approaches such as my TTreeViewPresenter that connects an IObjectList from Spring4D to a TVirtualStringTree to display and even edit data.
  7. I think in the DI book there is a chapter about injectables and creatables. Stuff that you bind to UI are usually creatables thus objects and should not have a problem. Binding interfaces is almost if not entirely impossible in a clean way because they simply don't have property RTTI.
  8. Stefan Glienke

    What's the best common folder for...

    I think so but I would rather consult the Windows documentation on roaming profiles to be sure.
  9. Stefan Glienke

    Bug in Delphi string behavior?

    The refCount is -1 because its a reference to a string literal - UStrClr being called because passing to out does not deallocate but still put nil into the passed variable. And fwiw the empty string also happens for WideString because then WStrClr is being called before passing as out. And while we are at it - yes AnsiString as well - LStrClr in that case.
  10. Stefan Glienke

    What's the best common folder for...

    There is no C:\Users\Public\Public Documents - that's just how they get displayed in the explorer - click into the address bar and you see its C:\Users\Public\Documents (by default - it can be anywhere else) Is the file ... for the program itself and ... only on this machine and for every user -> %programdata%\<program name> only on this machine and only for current user -> %localappdata%\<program name> available on other machines for the current user -> %appdata%\<program name> some document/file for the current user only -> %userprofile%\documents something that should be available for other users on this machine as well -> public documents (I think there is no variable by default for that, only for the public folder, but the public documents can actually stored somewhere else, I think registry holds that information)
  11. Stefan Glienke

    Update Interface property value with RTTI

    There is no RTTI available for interface properties - you have to refer to them via the setter method name. And even that only works if the interface has {$M+} or inherits from IInvokable.
  12. Stefan Glienke

    Bug in Delphi string behavior?

    Sounds like an idea for a new rule to add for FixInsight and alike
  13. Stefan Glienke

    IDE Fix pack for Rio

    https://www.idefixpack.de/blog/ide-tools/ide-fix-pack/ and https://www.idefixpack.de/blog/downloads/ both say "10.3 (RTM/UP1/2/3)"
  14. That code would not even compile as the two New overloads in TBase don't differ from each other parameter wise.
  15. If an object implements many interfaces it handles many responsibilities and not only a single one (SRP). You can use aggregation and delegation of those interfaces.