doc/src/snippets/qtscript/scriptedslot/object.js
author Alex Gilkes <alex.gilkes@nokia.com>
Mon, 11 Jan 2010 14:00:40 +0000
changeset 0 1918ee327afb
permissions -rw-r--r--
Revision: 200952

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");
}