Phil 3.30.15

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");
          }
       }
    }

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.