Jump to content

Kryvich

Members
  • Content Count

    439
  • Joined

  • Last visited

  • Days Won

    8

Posts posted by Kryvich


  1. Well I found the bindings: 

    Quote

    Finding the Next and Previous Changes

    As you edit code, you can use keystrokes to quickly navigate to the Next and the Previous changes that you have made. The keyboard shortcuts are:

    • Ctrl+Shift+F7 -- moves to the previous line modified since the file was opened (green marking in the gutter).
    • Ctrl+Shift+F8 -- moves to the next line modified since the file was opened (green marking in the gutter).
    • Alt+Shift+F7 -- moves to the previous line modified since the last save (yellow marking in the gutter).
    • Alt+Shift+F8 -- moves to the next line modified since the last save (yellow marking in the gutter).

    http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Code_Editor

    • Like 1
    • Thanks 1

  2. Still, it is not clear why the compiler did not issue a warning about an unassigned Result. I minified the code to make it clearer.

    program TestUnassignedResult;
    {$APPTYPE CONSOLE}
    type
      TRec = record
        Data: Byte;
        function NS: TRec;
      end;
    
    function TRec.NS: TRec;
    begin
      Writeln('I''m in NS');
      // W1035 Return value of function 'NS' might be undefined <-- not showed!!!
    end;
    
    begin
      //..
    end.

     


  3. Yes, I used "Go to next difference" / "Go to previous difference" on the tool bar (34s - 42s on the video). I did not found any special buttons for "Next Unsaved Modification" / "Previous Unsaved Modification". You should compare Buffer and File to see unsaved modifications.

     

    Having said that, I should note that I usually use a third-party utility for text comparisons: Compare-It. It allows not only to compare, but also to modify files if necessary.


  4. @Attila Kovacs Fair remark. I made this conclusion from the article (see GIF above). In fact, I did not know that these icons can be turned off (Tools | Options | Editor options | Display | Show image on tabs). Looks even better, thank you for the tip!

    File-Tabs-with-bars.jpg.2969904db39cff1652dca4b7e2385c3d.jpg

    In addition to 10.2.3 CE, I have XE2 and older versions here. I do not have access to Delphi XE3 - 10.2.2. So if you're interested, I can try to recompile the package for the Delphi XE2.

    The plan for my future open-source and free projects is to move to 10.3 Community Edition when it will be available.


  5. If you like my Forms Humanizer for Delphi IDE, I have something new for you and other colleagues. It's a new free plug-in for Delphi 10.2.3 IDE, which shows the status of opened files in the form of colored bars in the tabs above the editor:

    ColorBarsOnTabSet.jpg.742ebb87f9b6cc0b0503695570492bde.jpg

    If you are interested you can download and test it here: https://sites.google.com/site/kryvich/kryvichs-editor-status-bars

     

    It is interesting that as follows from the article "New in 10.3: IDE UI Improvements in the Main Window", an appearance of the file tabs in the new Delphi 10.3 will change significantly:

    247822715_Codeeditortabs10.2vs10.3.gif.c02150f6ace06c032dafc0aaa523e54f.gif

     

    • Like 3

  6. A few suggestions for the post layout in the desktop version of community:

    ForumMessage-suggestions.jpg.fec17589e46e36da54e0f6348bef99ee.jpg

    • Shift the icon a little higher
    • Remove "Members"
    • Optionally remove the reputation and posts number, we can see this information by hovering mouse over the icon.
    • Move the blocks as showed by the arrows.

    People who came from Google+, are accustomed to a light design without optional elements.

    Thank you for the forum, it can be the best place for communications!

    • Like 1

  7. Thank you for mentioning a really big open-source project that I can test on my Delphi 10.2.3 CE. Yes, the same thing happens to me. (IDE FixPack installed.) It would be nice if Delphi developers tested their product on this project.  (6 minutes to rebuild the project is a record for me.)

     

    At yesterday's webinar "See What’s Coming in 10.3 Rio", they mentioned that the code completion in the new C++Builder will work in a separate thread and not block the editor. I hope they can later implement this function in Delphi too.


  8. At today's webinar, new custom managed records in Delphi have been shown. There was such a declaration:

    NewRecords.jpg.c6a9ecd3b71e2d83be18528c4d9afa37.jpg

    And the implementation of operator Assign:

    class operator TMyRecord.Assign(var Dest: TMyRecord; var Src: TMyRecord);
    begin
      Dest.Value := Src.Value;
    end;

    Is there an error here? Perhaps it would be more correct to write const Src: TMyRecord? Because the above declaration allows you to change the Src variable:

      Src.Value := Dest.Value;

    Even better it would be to write it as 

    class operator TMyRecord.Assign(const Src: TMyRecord): TMyRecord;
    begin
      Result.Values := Src.Value;  
    end;

    And prohibit to change the variable Result itself (it's preallocated).


  9. It's interesting that for spawned class types there is a special type check:

    type
      TApple = class end;
      TOrange = type TApple; // Identical inside but not the same semantically
    
    procedure TestApplesAndOranges;
    var
      apple: TApple;
      orange: TOrange;
    begin
      apple := TApple.Create;
      orange := apple; // <-- [dcc32 Error] E2010 Incompatible types: 'TOrange' and 'TApple'
    end;

    Great!

    Update: But:

      orange := TOrange.Create; // E2010 Incompatible types: 'TOrange' and 'TApple'
      orange := TApple.Create;  // E2010 Incompatible types: 'TOrange' and 'TApple'

    Hmm. So what is the orange that I have declared? We can find out like this:

     

    var
      orange2: TObject;
    ...
      orange2 := TOrange.Create;
      ShowMessage(orange2.ClassName); // 'TApple'

    This is the correct answer (the classes are the same inside). Only it is not clear why orange := TOrange.Create; does not compile...


  10. Yes, wrapping to the record type is possible. Though having the [optional] strong type checking for these types would be better. Detecting a possible error at compile time is much better than at runtime, right? The language already has everything to implement this:

    type
      // Aliases, no type checking on assignment
      TDistanceMeters = Double;
      TDistanceMiles = Double;
      // New custom types, [optional] type checking on assignment is needed
      TDistanceMeters = type Double;
      TDistanceMiles = type Double;

     

×