[ascoders] Re: AW: unterklasse von XML in flash 5?

  • From: "Claus Wahlers" <claus@xxxxxxxx>
  • To: <ascoders@xxxxxxxxxxxxx>
  • Date: Wed, 6 Nov 2002 00:25:28 +0100

wäre es nicht einfacher, einen callback zu definieren?

LevelXML = function () {
        this.dataXML = new XML();
        this.dataXML.callback = this;
        this.dataXML.onLoad = this.onLoad;
};
LevelXML.prototype.onLoad = function () {
        trace(this.callback.method());
}

oder so:

LevelXML = function () {
        this.dataXML = new XML();
        this.dataXML.callback = this;
        this.dataXML.onLoad = function() { this.callback.onLoad(); };
};
LevelXML.prototype.onLoad = function () {
        trace(this.method());
}

cheers,
claus.

------------------------------------------------------
Archiv   : //www.freelists.org/archives/ascoders/
Optionen : //www.freelists.org/list/ascoders
------------------------------------------------------

Other related posts: