Cursor position after compilation error

jumisjumis Member Posts: 6
edited 2005-10-06 in Navision Attain
Hi All,

When you save and compile an object and there is a compilation error in it, usually the cursor is brought to a code line or a property value with the incorrect syntax. However, sometimes this doesn’t work thus making it difficult to locate an error.

Does anyone know the cause and how to bring Navision C/SIDE back to normal work?

Thanks.

Mindaugas ](*,)

Comments

  • jmjm Member Posts: 156
    Hi jumis,

    my experience is that e.g in Reports with an error in the code of a function to cursor position is not set correctly.
    maybe that this is correctef in version 4.0.

    i use the following workaround:
    go to the code of the funtions and insert an "X " at the begin of a code line.
    now there are chances:
    - first the error is before the line with the X -> set the X earlier
    - the compiler says that he does not know variable X -> set the X later
    so you can detect the position of your error.

    br
    Josef Metz
    br
    Josef Metz
  • DenSterDenSter Member Posts: 8,307
    I know sometimes it's hard to see what the error is, but I think that the combination of the error message and the position of the cursor is most of the time a good indication of what is wrong. Usually the error is close to where the cursor is, and indicates that you forgot a semi-colon ( ; ) or something like that.

    Also, you should teach yourself to save your work very often (I personally save my objects every 2 lines of code or something like that, Ctrl+S/Enter is in my fingers' muscle memory :?), so that you know what you've just done, and it's easy to remember what it is that cause the compile error.
  • dlacabadlacaba Member Posts: 17
    I've noticed that this usually happens on tables and reports. When you close the object to compile it and it gives you an error, the cursor focuses on the table or report, which then changes the code window to focus on a particular line associated to the table/report window. I typically use F11 directly in the code window which always bring me to the correct line.
Sign In or Register to comment.