jOOPL 1.0.3

Rating: No reviews yet
Downloads: 12
Change Set: 67476
Released: May 31, 2011
Updated: May 31, 2011 by MFidemraizer
Dev status: Stable Help Icon

Recommended Download

Application joopl.min.js
application, 5K, uploaded May 31, 2011 - 12 downloads

Release Notes

This is another bugfix release.

Solves a wrong behavior of class fields that was ending in sharing them across class instances.

This 1.0.3 release absolutely fixes this problem since this code sample works with no troubles:

var A = $class.declare(
    function () {
        this.$_.name = "hola";
    },
    {
        A: function () {
            document.write(this.GetName());
        },

        GetName: function () {
            return this.$_.name;
        },

        SetName: function (value) {
            this.$_.name = value;
        }
    }
);

var B = $class.declare(
    function () {
        this.$base.$ctor();
    },
    {
        A: function () {
            this.$base.A();
        }
    },
    A
);

var C = $class.declare(
    function () {
        this.$base.$ctor();
    },
    {
        A: function () {
            this.$base.A();
        }
    },
    B
);

var D = $class.declare(
    function () {
        this.$base.$ctor();
        ;
    },
    {
        A: function () {
            this.$base.A(); 
        }
    },
    C
);

var ab = $new(D);
var bc = $new(C);
var cd = $new(A);

ab.SetName("John");
bc.SetName("Elen");
cd.SetName("Alf");

ab.A(); // Prints 'John'
bc.A(); // Prints 'Elen'
cd.A(); // Prints 'Alf'

Reviews for this release

No reviews yet for this release.