Results 1 to 8 of 8

Thread: Delphi code completion

  1. #1

    Delphi code completion

    I think most people who used Delphi know about code completion feature.
    that is for example if you put a full stop after a class or a record variable you get a list of available variables and methods of the class/record. Now Delphi assumes that it's doing a good job by verifying the variable type in the context of the expression and filters out inappropriate types. For instance:
    Code:
    type
      TVec3 = record
        x, y, z: single;
      end;
    ...
    var
      v: Vec3;
      s: string;
    ...
    Now if I type "s := v." and press CTRL+SPACE the code completion will not give me a list of variables available in TVec because Delphi thinks that type "single" is not appropriate for assigning to a string but I actually want it to show me a complete list of variables in TVec3. Does anyone know if there is a way to disable the type verification in Delphi, specifically in BDS2006?

  2. #2

    Delphi code completion

    I would also like to know this...

    I think Delphi assumes a particular coding style.. one which I somtimes fall out with.
    I belive that if TVec3 has a string member, it would appear. But then, only the string member.

    It does make you think about the types though, which is useful.. however it would be nice to cave a way to configure the amount of hand holding the IDE actually does as sometimes I just want to see everything which is exposed by the object regardless of the type I'm assigning it to.

  3. #3

    Delphi code completion

    In that case I usually type something like "; v." - and Delphi shows all members as it thinks that I'm going to asign values to them.

    Or you can just go somewhere after existing "; " and press the same CTRL+SPACE - and Delphi will show up all variables, types available at this point and with this drop-down box open just type "v." to see members of "v" record.

    In both cases you will have some unwanted text in editor, but...
    There are only 10 types of people in this world; those who understand binary and those who don't.

  4. #4

    Delphi code completion

    That doesnt necessarily work every time,
    because BDS2006 has a built in check-errors-while-you-type thing, and if you leave

    Code:
     S := ; v.
    It will complain that S is not getting assigned to anything, and therefore shuts down ALL of the code completion. :?
    My site: DelphiTuts.com (coming soon)...

    Download Font Studio 4.21 here.

  5. #5

    Delphi code completion

    I think Borland or CodeGear should have made an option to disable type verification in code completion... I was hoping that there was one, just hidden somewhere :roll:

  6. #6

    Delphi code completion

    good

  7. #7

    Delphi code completion

    install CnWizards,
    http://cnpack.org/index.php?lang=en

    believe me,
    delphi + CnWizards is more productive than python :shock:
    From brazil (:

    Pascal pownz!

  8. #8

    Delphi code completion

    Quote Originally Posted by Dan
    I think Borland or CodeGear should have made an option to disable type verification in code completion... I was hoping that there was one, just hidden somewhere :roll:
    Hex editor with $C3 or $90 data is your friend.
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •