Sha256: ebc787cb7acafcbc3f9fb4ef6806fdc2165ecbc23f73cf44c1d92ac45a1cca33

Contents?: true

Size: 642 Bytes

Versions: 3

Compression:

Stored size: 642 Bytes

Contents

include('uki.js');
/** @namespace */
uki.view = {
    declare: function(/*name, baseClasses, implementation*/) {
        var args  = uki.toArray(arguments),
            name  = args.shift(),
            klass = uki.newClass.apply(uki, args),
            parts = name.split('.'),
            obj   = root,
            i, part, l = parts.length - 1;
        
        klass.prototype.typeName = function() { return name; };
		
        for ( i= 0; i < l; i++ ) {
            part = parts[i];
            if (!obj[part]) obj[part] = {};
            obj = obj[part];
			
        };
		
        obj[ parts[l] ] = klass;
        return klass;
    }
};

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
uki-1.1.4 frameworks/uki/src/uki-core/view.js
uki-1.1.3 frameworks/uki/src/uki-core/view.js
uki-1.1.2 frameworks/uki/src/uki-core/view.js