8:00 – 3:00 SR
- Mark, who is standing in for Lenny, found this and I verified. Entering a POC in a new FR doesn’t show up in the list.
- Testing the new callback scheme in typescript testbed.
- Tried it, and was quite hopeful, but the scheme failed with the timeoutService callback. Bad, because that’s a basic Angular component and messing with that just isn’t in the cards. But the fatPrototype/fatSuper scheme works. Now I just need to be able to make prototype chaining work right. Done! Here’s the entire class:
export class FatSuperBase { public functionMap:any[]; constructor() { this.functionMap = []; } public setFatPrototype(fn:Function, n:string){ // TODO: look for earlier prototypes that we might need to call if(!this.functionMap.hasOwnProperty(n)){ this.functionMap[n] = []; } this.functionMap[n].push(fn); } public fatSuper(fnName:string, childArgs:IArguments){ // TODO: look for earlier prototypes that we might need to call var fn:Function; var farray:Function[]; if(this.functionMap.hasOwnProperty(fnName)){ farray = this.functionMap[fnName]; fn = farray[farray.length-1]; fn.apply(fn, childArgs); }else{ console.log("fatSuper(): function '"+fnName+"'does not exist on the prototype chain"); } } }
