Jump to content

haley

Members
  • Content Count

    7
  • Joined

  • Last visited

Posts posted by haley


  1. Mmm personally VS Intellisense has never failed for me ever...it can get really slow on very very large projects but keeps working, albeit slowly. I've noticed that Delphi's Code Insight lies to me a lot, finding problems where there aren't any, LOL whut. I second @Der schöne Günther that Visual Studio Code is an amazing editor, I would say probably the best editor out there right now, I use it for Angular and Dart and just love it.


  2. 4 hours ago, David Schwartz said:

    As much as people love to talk about the principles of OOP, it baffles me that so many Delphi programmers still seem to toss all of that out the window when it comes to Delphi Forms. It's like, "Oh, Forms ... yeah, they're objects, but ... meh ... it's too much trouble to define properties and DI and stuff. That 'encapsulation' nonsense is for library files, not our own units."

    I know right? I'm like that too when it comes to Delphi, LOL. Usually when I'm using C# or Angular, creating classes are so easy, you can write one up so quickly that you don't have to think about it. In Delphi it's a whole lot more verbose, and annoying,  so I try and avoid it and end up working around it. That's just my opinion anyway.

    • Like 1

  3. Mmm I guess another way to do it, if you don't want to bother changing the min and max values on a scrollbar, could be to assign the max value to a constant and then use that to calculate the amount that you are after. Could be useful if you have a lot of scrollbars on your page.

    Const
        VALUE_MAX = 256;
    
    pos := scrollbar1.position;
    
    dataValue := (round((pos div 100) *  VALUE_MAX));

    And then you don't need to bother with having to calculate the percentage:

    percentLabel.caption  :=  inttostr(pos);

    It also makes it easier if you need to change the max value, because you can just change the constant value and don't have to worry about the scrollbar.

     

    But I suppose it's a much of a muchness, really.

     

×