Hi,

Of course my code was ineficient. Here we go:

femalePatient = ( $user == 'Dan' ) ? function(shoesize) {
        femalePatientBase.apply(this,[shoesize]);
        var oldgetage = this.getAge;
        this.getAge = function() {
                var a = oldgetage.apply(this,[]);
                return a/(this.or(this.not(touchy),a<30)?1:2);
        };
} : function(shoesize) {
        femalePatientBase.apply(this,[shoesize]);
        var oldgetage = this.getAge;
        this.getAge = function() {
                var a = oldgetage.apply(this,[]);
                if( this.or(this.not(touchy),a<30) ) return a;
                throw('Age not available for female Patients');
        };
};

Christof

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to