Jump to content

Bernard

Members
  • Content Count

    48
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Bernard


  1. Hi All,

     

    Just got a  chance to install Delphi 10.4 on my windows 7 Laptop and loaded up a sample.

     

    C:\Users\Public\Documents\Embarcadero\Studio\21.0\Samples\Object Pascal\VCL\ToggleSwitch

     

    I ran it and when I change the VCL style to Windows10Blue or Windows10Dark it displays incorrectly

     

    Anyone else got this.

     

    By the way thanks everyone for the great info on this site

    Blue.png

    Dark.png

    Plain10.png


  2. On 5/14/2020 at 8:08 AM, Anders Melander said:

    Because it's a one-pass compiler (mostly). The benefit is that it is fast. The price is that there are some things that are not possible.

    Reference types can be forward declared because their size are always known (=SizeOf(pointer)). The size of record types are not known until they have been fully declared. This means that the compiler cannot determine the layout of a record type if it contains other record types that have not been fully declared, and it needs to know the layout in order to generate the code that uses it.

    This problem can be solved, with certain limitations, while still staying a one-pass compiler, but at a cost of added complexity in the compiler and longer compile time.

    Is this different than Classes with forward declarations?


  3. 4 hours ago, Anders Melander said:

    Because it's a one-pass compiler (mostly). The benefit is that it is fast. The price is that there are some things that are not possible.

    Reference types can be forward declared because their size are always known (=SizeOf(pointer)). The size of record types are not known until they have been fully declared. This means that the compiler cannot determine the layout of a record type if it contains other record types that have not been fully declared, and it needs to know the layout in order to generate the code that uses it.

    This problem can be solved, with certain limitations, while still staying a one-pass compiler, but at a cost of added complexity in the compiler and longer compile time.

    I wonder if the solution could be a post processor that processed the forward declarations and created a helper file for the compiler to use during compilation time.  Now the compiler could remain a single pass.

     


  4. 4 hours ago, Anders Melander said:

    Without access to the compiler source it's hard to tell, but I'll bet there are some.
    For one, as far as I can tell, it would require forward declaration of the record and I know there are good reasons why that isn't possible.

    How would you envision forward declaration of a record method would look?

    Could you elaborate on why it is not possible? 

     


  5. 9 hours ago, Uwe Raabe said:

    Yes, because the reference to tPolar2D is only inside tPoint2D, which still has to be declared after tPolar2D.

     

    The benefit of the operators is the ease of conversion by assignment. This is the (corrected) declaration with some example assignments (TBD: calculations):

     

    The class operators for records with calculations that fit my example are a great solution for this issue.

     

    Thanks for that.  

     

     


  6. 2 hours ago, Uwe Raabe said:

    What about operators:

    
      tPoint2D = record
        x: Double;
        y: Double;
        class function Implicit(A: tPoint2D): tPolar2d;
        class function Implicit(A: tPolar2D): tPoint2D;
      end;

     

    Does this get rid of the Circular reference issue?

     

    I have always found it starange that records have class functions instead of record functions.

     

    Feels funny naming a record function a class function.

     

    Its like when one of my young kids calls a poo a pee.  I know that they were trying to say 🙂


  7. It would be great with all the record enhancements in the next version to be able to write

     

    tPoint2D = record;

     

      tPolar2D = record
        Radius: Double;
        azimuth: Double;
        function ToCartesian: tPoint2D;
      end;

     

      tPoint2D = record
        x: Double;
        y: Double;
        function ToPolar: tPolar2D;
      end;

     

    Thanks again for the feedback


  8. Hi All,

     

    Is there a better way of doing the following, getting rid of the tPolarHelper, without changing to classes.

     

      tPolar2D = record
        Radius: Double;
        azimuth: Double;
      end;

     

      tPoint2D = record
        x: Double;
        y: Double;
        function ToPolar: tPolar2D;
      end;

     

      tPolarHelper = record helper for tPolar2D
        function ToCartesian: tPoint2D;
      end;

     

    I know if the above were classes then I could write

     

      tPoint2D = class;

     

      tPolar2D = class
        Radius: Double;
        azimuth: Double;
        function ToCartesian: tPoint2D;
      end;

     

      tPoint2D = class
        x: Double;
        y: Double;
        function ToPolar: tPolar2D;
      end;

     

    Thanks.


  9. Thanks for all your feedback.

     

    The support team have given me a temporary license and everything is working again.

    There must have been an issue with the old one.

     

    Thanks again everyone


  10. hello all,

     

    Thanks for the replies.

     

    So far his is what I have...

     

    A machine setup with one user account set as Administrator.

    A clean Windows 10 64 bit install

    No antivirus.

    Delphi Rio 10.3

     

    A) I have used the http://altd.embarcadero.com/download/radstudio/10.3/radstudio_10_3_3_esd7899_nt.exe installer

     

    and did not work

     

    b)  I performed a complete manual uninstall via https://community.idera.com/developer-tools/general-development/f/installation-issues-23/68076/manual-uninstall-of-rad-studio-delphi-c-builder-10-3-rio

         any time I retried the install.

     

    I repeated A and B quite a few times now.

     

    I also have a loaptop with win 7 that I use for testing and working on customer sites when necessary.  It also stopped working.  I did the same on it.

     

    regards,

     

    Bernard


  11. Hello everyone.  I have been having issues with my Delphi License.  I should have 2 years left on subscription, and it shut me out on the 1st of this month. 

    The support team has been good, but they cannot so far resolve the issue.

     

    I have rebuilt a computer from scratch with a new SSD.   I used this opportunity to upgrade.

     

    Installed Windows

    Installed RAD using the installer

     

    When I add the Serial number to register.  It retrieves all the correct info.

     

    Expiration Date 27/03/2022.

    Is Subscription: Yes

    Commercial use : Yes

     

    and all the rest.

     

    When I hit done.  It says

     

    No valid license information found for Embarcadero Delphi 10.3.  You must provide a valid serial number ...... blah etc.

     

    I have uninstalled and installed and repeated numerous times.

     

    I am pulling my hair out, (saves the price of a haircut)

     

    I have not been able to write or compile for 2 weeks now.  Has anyone any ideas?

     

    Thanks in advance.

     


  12. Hello Everyone,

     

    I have a quick question about the correct way to use loop variables,  this has been answered before for the first part of the question. 

    It is something that I did not find a definitive answer for in the second part of the question.

     

    This is seen as bad code and I understand why

     

       For iFound := 0 to pred(Toolbox.Count) do

         if Toolbox.ID = ToolProfile.ToolName then
            break;

       iFound should not be used outside the loop to reference the found item

     

    Is that the same for the following?

     

        // Find the tool profile in the part tooling list
        for ToolInfo in Toolbox do
          if ToolInfo.ID = ToolProfile.ToolName then
            break;

     

    Should ToolInfo not be used outside the loop?  I am assuming the answer is no it should not.

     

    regards,

     

    Bernard

     


  13. Tried BringToFront after the LoadFile Command and I am still getting the same issue. 

    I accept there is a good chance this is a vendor issue. 

    I am going to stick with my workaround at the minute...

     

    procedure TfrmCAD.flbCadClick(Sender: TObject);
    begin
      LoadFile;
      btnDetect.SetFocus;
      flbCAD.SetFocus;
    end;

     

    and send a bug report to the vendor.  I appreciate all the help guys.


  14. Hi Guys thanks for the swift replies and sorry for the delay in getting back to you all.

     

    When I do not call the loadfile; Focus remains on the TFileListBox component as is expected;

     

    When I do call the Loadfile on its own...

    The loadfile loads a cadfile into an activeX component and at this point focus is lost. 

    I have also noticed that, at the point focus is lost, the tab button no longer gives focus to any of the other controls on the form.

     

    The activex control is a visual control EWDraw 3D.

     

    Is there something I am missing in the activeX end.  Do I need to catch the tab key and send messages from its keyboard event?


  15. Hello All,

     

    I have had an annoying issue in Delphi 10.3.2 setting focus back to a TFileListBox component after loading a file into an ActiveX control.

     

    Here is the code for the Click on the FileListBox

     

      procedure TfrmCAD.flbCadClick(Sender: TObject);
      begin
        LoadFile;
        flbCAD.SetFocus;
      end;

     

    On execution I would expect the focus to return to the flbCAD TFileListBox control.

    This does not happen.

     

    If I do the following code it does...

     

    procedure TfrmCAD.flbCadClick(Sender: TObject);
    begin
      LoadFile;
      btnDetect.SetFocus;
      flbCAD.SetFocus;
    end;

     

    Is this a bug in the VCL or am I doing something wrong?

     

    Thanks

     

     

     


  16. "the distance a car or a tyre has travelled in its lifetime."

     

    Could be written as distance clocked.

     

    I clocked 250000 miles on my old VW Golf.

    I probably only clocked 60 miles on the last set of tyres.  And that made me sad.  

     

    • Like 2
×