Recent

Author Topic: Sortable StringGrid example  (Read 12849 times)

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: Sortable StringGrid example
« Reply #15 on: April 27, 2017, 01:21:36 pm »
Done in 54755. All the infrastructure was already there, I just had to create a property and publish it. Not 100% perfect, though, because the sort icon replaces an eventually already present column icon.

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Sortable StringGrid example
« Reply #16 on: April 27, 2017, 02:13:23 pm »
Yes, the name is confusing but they are now the "standard" way to deal with Unicode in both Delphi and Lazarus.

Those functions really should be deprecated and better named functions should replace them. Compared to other languages, Object Pascal is getting pretty ridiculous with its millions of string types, terribly named string functions and such. It really is time for a clean up!
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Sortable StringGrid example
« Reply #17 on: April 27, 2017, 02:30:14 pm »
However the functions without Ansi... are reserved for dummy ASCII compatible compare without locale or sorting info.
See:
 http://docwiki.embarcadero.com/Libraries/Berlin/en/System.SysUtils.CompareStr
 http://docwiki.embarcadero.com/Libraries/Berlin/en/System.SysUtils.AnsiCompareStr
It is a historical remain I guess.
"...dummy ASCII compatible..." 

Do we need any more proof that it is time to clean up this mess!

Quote
BTW, I was reading about the new Delphi compiler for Linux. They had made big changes for string types.
Yes, they finally got rid of the AnsiString type completely! Well done Delphi! FPC, now it is your turn.
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

 

TinyPortal © 2005-2018