Jump to content

Uwe Raabe

Members
  • Content Count

    2907
  • Joined

  • Last visited

  • Days Won

    169

Posts posted by Uwe Raabe


  1. 7 minutes ago, FreeDelphiPascal said:

    No wonder their OS is going down

    If a market share value goes down, it does not imply that the absolute numbers are going down. If there were only 1 million Windows systems in the world, their market share would be 100%. Now when 4 million iPhones are sold, the Windows market share goes down to 20%, but there are still 1 million Windows systems.

    • Like 1

  2. 1 hour ago, pyscripter said:

    Did you know that?

    Yep! I first made use of that almost 10 years ago in a class holding translation strings. Before that the strings were indexed by an Integer, but later we extended that to string indices.

       property Items[Index: Integer]: string read GetItems; default;
       property Items[const Index: string]: string read GetItems; default;

    The interesting part was that both are marked as default properties, which allowed us to simply write something like this:

    Label1.Caption := Translations[42];
    Label2.Caption := Translations['Error'];

    The most benefit came from the fact that we could keep the Integer based translations and simply add the string based ones - all using the same Translations instance.

    • Like 2
×