doc/src/snippets/qtscript/scriptedslot/object.js
author Eckhart Koeppen <eckhart.koppen@nokia.com>
Mon, 19 Apr 2010 10:15:19 +0300
branchRCL_3
changeset 9 b5b118452c7d
parent 0 1918ee327afb
permissions -rw-r--r--
a8c775f23625952540b5349744722bcb9e37de45

function Object(timer, editor)
{
    this.editor = editor;
    this.counter = 0;
    timer.timeout.connect(notify);
    timer.timeout.connect(this, this.addLine);
}

Object.prototype.addLine = function()
{
    this.editor.append(this.counter);
    this.counter += 1;
}

function notify()
{
    print("timeout() received");
}