7:30 – 3:30 ESSO
- Town Hall and briefing prep
- Worked on design of Financial Assistant framework. Details are on the “Assistant Creator” page here.
7:30 – 3:30 ESSO
8:00 – 4:00 ESSO
<style> #demo { width: 100px; height: 100px; border: 1px #000 solid; background: #d72; position: relative; } </style>
<div id="demo"></div>
<script src='http://yui.yahooapis.com/3.5.0/build/yui/yui-min.js'></script>
<script>
YUI().use('dd-drag', 'dd-proxy', 'resize', 'resize-constrain', function (Y) {
var resize = new Y.Resize({ node: '#demo' });
resize.plug(Y.Plugin.ResizeConstrained, {minWidth: 50, maxWidth: 200});
var dd = new Y.DD.Drag({ node: '#demo' });
dd.plug(Y.Plugin.DDProxy); });
</script>
7:30 – 3:30 ESSO
7:30 – 4:00 ESSO
7:30 – 2:30 ESSO
2:30 – 4:00 OH
9:30 – 4:30 ESSO
8:00 – 3:00 ESSO
8:00 – 4:00 ESSO
7:30 – 3:30 ESSO
8:30 – 4:30 ESSO
8:30 – 4:30 ESSO
SubType.prototype.saySuperName = function(){
return "foo";
};
//--------- SuperType definition ------------
function SuperType(name){
this.name = name;
this.nickName = "None";
this.colors = ["red", "blue", "green"];
}
SuperType.prototype.setNickname = function(nickName){
this.nickName = nickName;
}
SuperType.prototype.sayName = function(){
alert("Name = "+this.name+", Nickname = "+this.nickName);
};
//--------- SubType definition ------------
function SubType(name, age){
SuperType.call(this, name);
this.age = age;
}
SubType.prototype = new SuperType();
SubType.prototype.sayAge = function(){
if(this.nickName == "None"){
alert(this.name+" is "+this.age+" years old");
}else{
alert(this.nickName+" is "+this.age+" years old");
}
};
//----------- sequential code --------------------
var instance1 = new SubType("Nicholas", 29);
instance1.setNickname("Nick");
instance1.colors.push("black");
alert(instance1.name+"'s colors are: "+instance1.colors); //"red,blue,green,black"
instance1.sayName(); //"Nicholas";
instance1.sayAge(); //29
var instance2 = new SubType("Greg", 27);
alert(instance2.name+"'s colors are: "+instance2.colors); //"red,blue,green"
instance2.sayName(); //"Greg";
instance2.sayAge(); //27
8:00 – 4:00 ESSO
8:00 – 4:00 ESSO
You must be logged in to post a comment.