Jump to content

aehimself

Members
  • Content Count

    1030
  • Joined

  • Last visited

  • Days Won

    22

Posts posted by aehimself


  1. I know I'm being picky, so feel free to completely ignore my "suggestions".

     

    But, in the era of OOP you might want to consider plucking all logic into a class, like TGamePascalGame. So instead of

      GameRun(nil, GameEvents);

    you simply could derive from TGamePascalGame, and say...

    mygame := TMyGameDerivedFromGamePascalGame.Create;
    Try
      mygame.Run;
    Finally
      mygame.Free;
    End;

    With this you immediately can get rid of the mandatory, huge Case statement in the method and simply provide a protected virtual procedure like DoStartup, DoShutdown, DoUpdate, DoRender and DoRenderHUD what your consumers can simply override.

    If you are thinking on the long run this will also make your life easier as adding new controllable features can simply be published by properties:

    mygame := TMyGameDerivedFromGamePascalGame.Create;
    Try
      mygame.EnableHardwareAcceleration := True;
      mygame.DataFolder := IncludeTrailigPathDelimiter(ExtractFilePath(ParamStr(0))) + 'mods';
      mygame.HResolution := 1024;
      mygame.VResolution := 768;
      mygame.VSync := False;
      mygame.FullScreen := True;
    
      // etc, etc..
    
      mygame.Run;
    Finally
      mygame.Free;
    End;

     

    The demo looks really good. I was thinking on trying myself out in game development so an easy-to-use library could keep my initial struggles at a minimum. So keep up the good work, I'll keep an eye on the repo for sure!


  2. 1 hour ago, Ian Branch said:

    Basically it is a log of events, each entry looking roughly like..

    If it's a log, definitely put them in a separate table, one log entry being one record, and store the timestamp in a separate field. Maybe even add a log category field, like "backgroundworker", "httpserver", "cache".

    On the long run, being able to quickly search log entries between a specified timeframe is a lifesaver!


  3. Depends on your application. I'd break the list up to elements (and store them in their separate table) because of two reasons:

    - You can use simple VarChar fields instead of MEMO / CLOB, which is more easy on resources

    - You can filter the list with your select if needed

     

    Edit: by having their own table you can even extend each list element with further properties later on


  4. You might want to include the differences, pros and cons in the GitHub readme not to leave the impression of a library that gets outdated as soon as you get used to it.

    Let's leave that feature to some JavaScript frameworks 🙂

     


  5. 5 hours ago, KenR said:

    Very strange. I take it that you just copied the contents of both zips to the bin folder!

    My process:

    - Install 11.2 and use it

    - Rename 4 affected files to *.*.original

    - Unzip both unofficial fixes to \bin folder

    - Try to use it, breakpoints broken, so

    - Rename patched files to *.*.patched, rename *.*.original to *.* and use it

    - Since 32 bit is working and DelphiLSP.exe is a part of the 32 bit version, I decided to use 32 bit version only. Rename those files to .original, rename .patched to normal

    - Breakpoints working, so I start to wonder and do the same with 64bit

    - Confused as hell, as it's working...?!

     


  6. 2 hours ago, Anders Melander said:

    But why? What problem are you trying to solve?

    I have only one valid explanation, which is I usually forget to sync and build a new language file and therefore the .xlat goes in in a separate commit.

    However, for the actual translation you need the GUI anyway and if you update the .xlat beforehand, you'll have no idea if there was a change or not (especially if we'll have the option to see changed entries only).

     

    So after all it would solve my issue of the file going in in a separate commit, but it's still not translated and built, so it would add no actual value.


  7. 28 minutes ago, pyscripter said:

    FWIW, I have tried the unofficial LSP patches and I could no longer debug programs.   So I went back to the original dlls and debugging was available again.   

    All my breakpoints just become unavailable (like code never gets executed in that function), did you meet the same issue?


  8. This is the second post where you are simply being rude and offending everyone around you.

     

    I learned it a long time ago but it's not clearly documented, but a solution can be found by hovering over a user's name:

     

    image.png.388ee4ad4e524824e3fa8b97cf94e759.png

    • Haha 1

  9. If you are sure they are always separated by commas, you can do

    Function GetRidOf(Const inString, inDeleteThis: String): String;
    Var
      mystr, s: String;
    Begin
      Result := '';
    
      For s In inString.Split([',']) Do
        If s <> inDeleteThis Then
          Result := Result + s + ',';
          
      If Not Result.IsEmpty Then
        Result := Result.Substring(0, Result.Length - 1);
    End;

    This should properly keep '100' in '1100' for example.

    • Like 1

  10. 1 hour ago, omnibill said:

    I just need to have a MySQL database that allows a connection from a remote computer.

    Using % as a host will allow all source IP addresses afaik. Check if you can set it, but it's a security risk, so be warned...


  11. 6 hours ago, Henry Olive said:

    I just found out Contains (StrUtils)

    Be careful with Contains, as it will trigger on substrings too. Maybe it's not the case with DocNos, but still. What I'd do is...

    DocNos := #9;
    
    CDS1.First;
    
    While Not CDS1.Eof Do
    Begin
      If Not DocNos.Contains(#9 + CDS1DOCNO.asString + #9) Then
        DocNos := DocNos + CDS1DOCNO.asString + #9;
      
      CDS1.Next;
    End;
    
    DocNos := DocNos.Substring(1, DocNos.Length - 2);

    This also can fail if the strings contain tabulator characters, but that's a small chance I'd be willing to take. The best solution would be to use a TList<String> and concatenate everything once it's filled.


  12. A profile in GitHub created 11, forum account 10 hours ago (1 post, no rating). Only a RAR file is uploaded, based on the screenshots containing binaries. Contact info is a free Yahoo E-mail address, installations are blocked by AV and there's no real description of what FPDelphi is. Online searches show fuel pump related stuff.

     

    I really mean no offence and it can be me living under the rocks, but for someone who has no prior knowledge this is way too suspicious to check out.

    • Like 6
×