title: Ace editor shows error
body: <p>I got the editor ace.js running on my site. Now when the user submits his code, a php file checks for correctness. If there are errors, I get an Array (errorArray) with the line numbers of the errors. E.g. there is 3, 17, 35. Now when I try to set arror annotations to the code editor, it only sets a annotation next to the last line in the array (in this example 35).</p>
  
  <p>This is the code:</p>
  
  <pre><code>$("#tipp").click(function(){
  
                          // wenn tipp geklickt
                              var str = response;
                              var errorArray = str.split(" ");
                              $(".errors").append(' &lt;div class="alert alert-warning alert-dismissable"&gt;&lt;button type="button" class="close" data-dismiss="alert" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;Hier sind deine Fehler!&lt;/div&gt;');  
                              for(var i=0; i&lt;errorArray.length-1; i++){
                                  console.log(errorArray[i]);
                                  editor.getSession().setAnnotations([{
                                      row: errorArray[i]-1,
                                      text: "Hier stimmt was nicht",
                                      type: "error" // also warning and information
                                  }]);
                              }    
                          });
  </code></pre>
  
  <p>Any suggestions how every line, which is in the array, gets an error annotation?
  Thx!</p>