Jump to content

Sherlock

Moderators
  • Content Count

    1291
  • Joined

  • Last visited

  • Days Won

    28

Posts posted by Sherlock


  1. You are aware of TStringLists DelimitedText property? 

      StrList := TstringList.Create;
      StrList.Delimiter := ',';
      StrList.StrictDelimiter := True;
      AddValuesToList(StrList);
      CSVString := StrList.DelimitedText;  // No trailing comma, no hassle, easy to read, not hard to explain..even 10 years from now

    Have not measured time on this yet, but unless you are processing strings in the millions, no worries.


  2. 15 hours ago, Yaron said:

    But how do you apply it to use with Delphi which in the docs says that the PAserver needs to be in a local network?

     

    Is there some help/docs on Delphi integration with such services for iOS development?

    This is very old, but should still be valid (at least the connection part):

    https://www.youtube.com/watch?v=zORe2voUHIU

    Please note that the prices may be outdated. And a first glance showed, they have an XE8 PAServer preinstalled, nothing newer.


  3. 40 minutes ago, Neutral General said:

    But there are going to be updates to the application. So in order to not have to shut down the whole service, the service is modular and can just temporary unload a DLL, update and then reload it.

    It is always good to try and be better than the hosting OS, and if the service is that vital, I'm sure you made risk assessments leading to counter measures for DLL-injection and the overall adverse effects of DLL-Hell. If you did it just because you could...I strongly advise to reconsider.

     

    But we are drifting away from the topic. Sorry for that.


  4. Oh, thanks. I thought there was an article on FMXExpress. I'm sad to say I don't have time to inspect code that comes without any explanations regarding purpose, function or instructions. So I wont be looking into this, but thanks anyway.


  5. Correct! Luckily I have very few records and if I need a list of them I use generic lists and the readability is just fine.

     

    Edith also feels the need to mention I have no legacy code to deal with aside from Delphi (hahaha, small joke). So, of course Thomas' method is a very good and simple way to increase readability in such problematic code segments.


  6. 41 minutes ago, dummzeuch said:

    I consider this

    
    Ptr := @SomeArray[SomeStructure.SomeIndex];
    Ptr.bla := 5;
    Ptr.blub := 10;
    // and 10 more lines like this

    as more readable than

    
    SomeArray[SomeStructure.SomeIndex].bla := 5;
    SomeArray[SomeStructure.SomeIndex].blub := 10;
    // and 10 more lines like this

     

    And I would identify the type behind @SomeArray[SomeStructure.SomeIndex] which you would have to do for that typed pointer you're using anyway and gotten a variable of that type. Making  this just as readable without explicit use of pointers:

    Element := SomeArray[SomeStructure.SomeIndex];
    Element.bla := 5;
    Element.blub := 10;
    // and 10 more lines like this

    I am very well aware, that there are pointers floating around behind the scenes all the time. But I prefer developing with a high level language also because I wont have to deal with them.

×