= Design + Software + The Rest

This Post is filed under Software

1 Comment

What Have I been Doing?

Jeremy always says I don’t blog enough. I read quite a few developer blogs, and honestly, most are really boring. I’ll tell you more of what I’ve been doing later. But here is a sample of some of the excitement:

function __reg(p_name, p_type, p_base){
if(!p_name || p_name == “”){throw new TrueException(”InvalidParamter”, “p_name is required”);}
p_type = (p_type)? p_type: function(){if(p_base){p_base.apply(this, arguments);}};
var t = window;
var names = p_name.split(”.”);
for(var i = 0; i < names.length; i ++){
if(!t[names[i]]){
t[names[i]] = (i == names.length – 1)? p_type: {};
}
t = t[names[i]];
}
};

function __wrap(p_base, p_val, constructor){
if (p_base != undefined && (p_val instanceof Function) && /\bbase\b/.test(p_val)) {
var wrapped = function(){
this.base = (constructor)? p_base: p_base.prototype;
return p_val.apply(this, arguments);
};
return wrapped;
}
return p_val;
};

You may comment now.

Isaac Weinhausen:

Nice! Now that’s a quality post.

Your Comment:

Your Name

Your Email (won't appear on site)

Your Web Site (optional)

Post this Comment