Jump to content

FredS

Members
  • Content Count

    408
  • Joined

  • Last visited

  • Days Won

    4

Posts posted by FredS


  1. 24 minutes ago, Stéphane Wierzbicki said:

    the more directories in the search path the worse the IDE react

     

    For sure. Executing a cmd which deletes DCUs that may have been compiled using different config seems to have helped a lot.

     

    I didn't come back until XE7 (D6->XE7) at which point there where huge issues with or without fix pack. The interesting part is that some of those got better with one minor release then came back in the next..

     

     


  2. 5 minutes ago, Stefan Glienke said:

    but people that want to write bad code would still have plenty of opportunities to do so

     

    Please, don't inject common sense into the Anti-With argument 🙂

     

    That said, I used to write WITH six even eight levels deep. Thought nothing of it, surely everyone knew the classes referenced within that and it was clear which one the property belonged to..

    Returning to that code ten years later was less fun..

    • Haha 1

  3. 12 hours ago, pcplayer99 said:

    it can not access  private field in original clas

     

    I have this test setup to let me know if this is ever changed in a new version of Delphi.

    Should be simple enough to replace TCustomTextFile with whatnot and run the test which I just ran in 10.4.1 and it passed:

     

    //MMWIN:CLASSCOPY
    unit _MM_Copy_Buffer_;
    
    interface
    
    
    implementation
    
    type
      TTestAccessToPrivateFieldHelper = class helper for TCustomTextFile
        function SetPrivateOwnsStream(AValue: boolean): boolean;
    end;
    
    
    { TTestAccessToPrivateFieldHelper }
    
    function TTestAccessToPrivateFieldHelper.SetPrivateOwnsStream(AValue: boolean): boolean;
    begin
      with Self do begin
        FOwnsStream := AValue;
        Result := FOwnsStream;
      end;
    end;
    
    end.
    //MMWIN:MEMBERSCOPY
    unit _MM_Copy_Buffer_;
    
    interface
    
    type
      THelperTests = class(TObject)
      public
        [Test(True)]
        procedure TestAccessToPrivateField;
      end;
    
    
    implementation
    
    procedure THelperTests.TestAccessToPrivateField;
    var F : TTextFile;
    begin
      F := TTextFile.Create('testing.txt', TEncoding.UTF8);
      try
        Assert.IsFalse(F.SetPrivateOwnsStream(False));
        Assert.IsTrue(F.SetPrivateOwnsStream(True));
      finally
        F.Free;
      end;
    end;
    
    
    end.

     

    • Like 1

  4. Anyone able to switch 'Configuration' and have that update in the 'Project Manager' , without using the 'Config Manager'?

    My 10.4.1 is still Sandboxed on Win7..

     

    Also 'Build Groups' are using the wrong config, strangely changing that (Options) doesn't update the 'Project Manager' display but Barbie band-aids that issue..

     


  5. 1 hour ago, Angus Robertson said:

    Quick Create don't support any other means of access

    - Quick installed Ubuntu 20.04

    - ran: `sudo apt-get install openssh-server`

    - connected via WSL from Host:

    fred@PUTER:~$ sudo ssh fred@172.17.134.53
    fred@172.17.134.53's password:
    Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.4.0-26-generic x86_64)

     


  6. 7 hours ago, Angus Robertson said:

    Windows 10 Hyper-V virtual Ethernet adapter

    If your Host machine has a single NIC then you may need to get the IP from the Hyper-V virtual Ethernet adapter to reach your machine.

    If that is the case the bottom panel has three tabs, the networking tab will have the VMs IP after it has been started.


  7. 1 hour ago, Anders Melander said:

    Document Insight can use external XML files. Very useful when you don't want to make the source unreadable with XML DOC comments.

     

    Think I tried that before and moving existing documentation failed. Just tried again and same..

    It does appear to work when I add new documentation, however there are these caveats:

    Quote

    Warning: Although separated XML documentation will make source code clean, the price is that neither built-in Help Insight nor Code Insight support this documentation style. In addition, you have to manually modify corresponding documentation file carefully when you changed a signature of an API.

     

×