doc/src/snippets/qtscript/scriptedslot/object.js
branchRCL_3
changeset 8 3f74d0d4af4c
parent 0 1918ee327afb
equal deleted inserted replaced
6:dee5afe5301f 8:3f74d0d4af4c
       
     1 function Object(timer, editor)
       
     2 {
       
     3     this.editor = editor;
       
     4     this.counter = 0;
       
     5     timer.timeout.connect(notify);
       
     6     timer.timeout.connect(this, this.addLine);
       
     7 }
       
     8 
       
     9 Object.prototype.addLine = function()
       
    10 {
       
    11     this.editor.append(this.counter);
       
    12     this.counter += 1;
       
    13 }
       
    14 
       
    15 function notify()
       
    16 {
       
    17     print("timeout() received");
       
    18 }