I've ran into a slight issue in Delphi XE6:
I've ran into a slight issue in Delphi XE6:
- hints/warnings/errors/etc. in messages are always reported 2 lines upper than the actual issue, i.e. error is at line 500, the message shows the error to be at line 498
anyone know how this can be solved? it's really annoying (:
- hints/warnings/errors/etc. in messages are always reported 2 lines upper than the actual issue, i.e. error is at line 500, the message shows the error to be at line 498
anyone know how this can be solved? it's really annoying (:
Check your code for line endings that are not CRLF, for instance with https://bitbucket.org/jeroenp/besharp.net/src/tip/Native/Delphi/Apps/Console/NormalizedLineBreaksToCRLFConsoleProject
ReplyDeleteI wrote myself a crlf fixer and this problem went away.
ReplyDeleteJeroen Wiert Pluimers , Warren Postma thank you, I'll look into that and come back with a response, but I can see that being the issue(in my case) because I used Notepad++ to replace a lot of unit names within a project that I've upgraded, maybe Notepad++ screwed up the the line breaks or D2010 screwed up at some point...
ReplyDeleteTools -> Options -> Editor Options -> uncheck Preserve line ends, that forces saving source code with proper Windows line endings. Best way to avoid crlf issues.
ReplyDeleteDalija Prasnikar and still within the IDE every once in a while it gets it wrong.
ReplyDeleteI'm not sure why yet.
Jeroen Wiert Pluimers Line endings are corrected only when file is saved, maybe IDE doesn't refresh properly.
ReplyDeleteit seems that the line breaks were the issue, and I know where I failed: in the replace, I've set \r in stead or \r\n
ReplyDeleteThank you all for your input, helped a lot!
Sometimes this can be related to the git line endings handling (core.autocrlf) and how others have set this settings (https://help.github.com/articles/dealing-with-line-endings)
ReplyDeleteStefan Glienke we're using svn and the error was on my part when I've done the replace with "\r" in stead of "\r\n"
ReplyDeleteJust wanted to remind that ModelMaker Code Explorer has a rarely used but very useful feature to detect and correct irregular line ends. I use it from time to time when something breaks them...
ReplyDeleteNice. There are many great little things in MMX Code Explorer.
ReplyDelete