Menu

Delphi 2009

Developers
RW
2008-10-15
2013-05-23
  • RW

    RW - 2008-10-15

    How is a Delphi 2009 release going?

    Great utility Anthony, been using it for years

    Regards
    Ray

     
    • Anthony Steele

      Anthony Steele - 2008-10-15

      Hi

      Jean-Fabien Connault is checking in code to support Delphi 2009. there are just a few bugs left, and a release will happen when they're fixed.

      Thanks
      Anthony

       
    • RW

      RW - 2008-10-15

      Anthony,

      Thanks for the update, keep up the great work

      Cheers
      Ray

       
    • Jean-Fabien Connault

      Ray,

      JCF 2.40 has been released and it does support Delphi 2009.

      JEFF

       
    • Binis Belev

      Binis Belev - 2008-10-30

      There are still some thing that need to be handled. Like Anonymous methods and inheritance...

      Keep up the good work!

       
    • Anthony Steele

      Anthony Steele - 2008-11-10

      I have code samples for Delphi 2009 generics, "result := inherited;" syntax, and for anonymous methods.
      Fortunately generics worked already, due to work done for delphi.net

      What else is there to support in Delphi 2009? Code samples would be appreciated.

       
    • Binis Belev

      Binis Belev - 2008-11-11

      So far the the biggest problem is anonymous methods.

      Something like this

      ...while (function (Stream: TStream; var a: Integer; b: Integer): Integer
      .............begin
      ................result := 50;
      .............end)(nil, a, 0) > 0 do
      ...begin
      ...end;

      is valid syntax.

      I wonder if new formatting options is needed... like I want method body to be aligned with the start of declaration or one or two idents later. However all samples from CodeGear looks like this

      ..Result := function(x: Integer)
      ..begin
      ....Result := x + y;
      ..end;

      Quite unreadable by my opinion.

      P.S: btw you probably already know but this is a declaration of an anonymous method. This also breaks the formating.

      type
        TFuncOfIntToString = reference to function(x: Integer): string;

       
      • Anthony Steele

        Anthony Steele - 2008-11-11

        I take it there can also be anonymous procedures? Is there an example of these?

         
        • Binis Belev

          Binis Belev - 2008-11-12

          Definitely. Can't wait for it :)

           
    • Binis Belev

      Binis Belev - 2008-11-12

      Sure.

      type
      ...TFuncOfIntToString = reference to procedure (var x: Integer);

      var
      ...p : TFuncOfIntToString;

      procedure proc(p: TFuncOfIntToString);
      begin
      //
      end;

      begin
      ...p := procedure (var x: Integer)
      ..........begin
      .............{whatever}
      ..........end;
      {...}
      ...proc(p);
      {or}
      ...proc(procedure (var x: Integer)
      ...........begin
      ..............//
      ...........end)
      end;

      About generics. If I'm not mistaken currently whatever is between <> stays as it is. It would be nice to have some formating options like one in function parameters.

      <a,r,p>       ->       <a, r, p>
      or
      <a>            ->       < a >

      etc.

       
      • Anthony Steele

        Anthony Steele - 2008-11-12

        Thanks. I will put that code into my anonymous method test cases. I have started work on this.

        Formatting generics is a good idea, but fixing parse failures must come first.

         
      • Anthony Steele

        Anthony Steele - 2008-11-12

        I have added the unit TestDelphi2009AnonymousMethod.pas, which has some anonymous method demo test code.

         
        • Binis Belev

          Binis Belev - 2008-11-13

          Yeah I saw it. Nice to now that you are working on it.

          Something small that I've just discovered.

             TRecordList<T> = class(TEnumerable<T>)
             public
                type
                   TEnumerator = class(TEnumerator<T>)
                   end;
             end;

          there is no indent for types declared inside an class

           
      • Anthony Steele

        Anthony Steele - 2008-11-15

        "whatever is between <> stays as it is" This is the case, See SingleSpaceAfter.pas, around line 83.

        There is definitely room of options here, but I have for now done the basics of a single space after the comma.

         
      • Anthony Steele

        Anthony Steele - 2008-11-15

        So how many formatting options are wanted?
        it could be just a couple of checkboxes: Space after comma y/n, Space after opening "<" and closing ">" y/n
        Or the options for add/remove/leave as is on those spaces
        Or also allow the variant for a space before the comma

         
        • Binis Belev

          Binis Belev - 2008-11-17

          Well I don't know...  Leading/Trailing space and Space before coma is the two options I need. Actually I can't think of other possibilities but who knows...

           

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.