7

I'm doing development for Blackberry 10 using Cascades, which includes QT and QML. I find that I sometimes make mistakes in my QML file, but they don't get picked up at compilation time. How can I check whether I've made a syntax error, or mis-named a function call, or other typical errors?

paulmorriss
  • 2,489
  • 26
  • 29

3 Answers3

4

QML is a dynamic language that is evaluated at Runtime. There is no compilation step and due to the nature of javascript and the dynamic nature of the global context there is no way for it to tell if what you are writing is correct/incorrect until it is evaluated. QtCreator can help with some of the QML errors you will find, but there is unfortunately no good way to get syntax errors about your javascript until it is evaluated and it explodes.

Personally, I have found good usage of the debugger to be the key to making these sort of fixes easy.

tldr; Keep your javascript clean and to a minimum there is no compile time checking.

Deadron
  • 4,667
  • 1
  • 15
  • 26
0

open terminal in IDE connect your device or emulator using blackberry-SSH after connecting enter slog2info it show syntax and all typical error JavaScript with description and line NO.

Ajeet47
  • 1,711
  • 1
  • 13
  • 18
  • 1
    It the run-time way to check errors. But you check only paths your code use right now, not all parts of every file. The question was about compile-time, and the answer is: there's no way to check everything at compile-time. – Marc Plano-Lesay Jul 19 '13 at 13:04
0

If there are any mistakes it will show those lines in RED marks. It is dynamically checks there is no need to worry about compile. If you done wrong you will not see the DESIGN CONSOLE correctly.