Undeclared Identifier in editor. It does the red squiggly underline and the tooltip shown "undeclared identifier 'xxx'", yet my program compiles (and Builds) just fine, and I can Ctrl+LClick to navigate to that method or function. I have a LOT of cases like this in my code.

Undeclared Identifier in editor. It does the red squiggly underline and the tooltip shown "undeclared identifier 'xxx'", yet my program compiles (and Builds) just fine, and I can Ctrl+LClick to navigate to that method or function. I have a LOT of cases like this in my code.

So why does Delphi IDE keep thinking it is a undeclared identifier? I'm using Delphi XE by the way.

Comments

  1. A lot of these cases are fixed in newer versions.

    But to answer your question, why: because the parser used for the editor - which is not the compiler - thinks it's an undeclared identifier. Try it out on Tokyo, much improved, errors in far fewer cases.

    ReplyDelete
  2. Thanks David Millington. So far I've been ignoring them (unless I get a real compilation error), but it is super annoying seeing all the red squiggly underlines in my code. :-(

    Is there a way to turn off that red underline feature in the editor?

    ReplyDelete
  3. A lot of these cases still exists in newer versions too :/

    ReplyDelete
  4. Lars Fosdal Samples attached to QPs help, if you can find them, please. I know we've fixed a few.

    Graeme Geldenhuys Yes, turn off 'error insight' in Tools > Options > Editor Options.

    ReplyDelete
  5. Lars Fosdal Excellent stuff. Thankyou.

    ReplyDelete
  6. Graeme Geldenhuys Just lobotomize the editor. Error Inside has always been unreliable.

    ReplyDelete
  7. Bill Meyer: yes the false positives are all over in Delphi XE's editor. I've followed David's instructions, and disabled the Error Insight feature. There was just too many red squiggly lines.

    Another editor issue is the bracket matching - that also easily goes out of whack, even though the code is 100% correct. But that's an issue for another time. Unfortunately I don't have the means to upgrade the current project to a later Delphi version, so I don't know if any of these editor issues have been fixed.

    ReplyDelete

Post a Comment