This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$class({ | |
//Class definition | |
$def:function Animal(){ | |
this.name = ""; | |
this.getName=function(){return this.name;} | |
this.setName=function(value){this.name=value;} | |
this.Animal=function(p_name){ | |
this.name = p_name; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (){ | |
/*mummy*/ | |
var mum = { | |
types:new Array(), | |
interface:function(interface_def){ | |
var interface_name = (new interface_def).constructor.name; | |
mum.types[interface_name]= new interface_def; | |
}, | |
/*class def*/ | |
class:function(p_class){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function animal(p){ | |
var note = "a note from animal"; | |
var name = p | |
this.getNote=function(){return note} | |
this.setNote=function(value){note = value} | |
this.getName=function(){return name;} | |
this.setName=function(value){name=value;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Object.prototype.extends = function(p_class){ | |
var instance = new p_class | |
instance.constructor = this.constructor; | |
instance.getTypeName = function(){return instance.constructor.name;} | |
instance.parent = new p_class; | |
return instance; | |
} | |
//Object.prototype.getSelf = function(){return self;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (){ | |
/*mummy*/ | |
var mum = { | |
extends:function(child){ | |
var thatChild = child; | |
return new function(){ | |
this.with = function(parent){ | |
var instance = new parent; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pouet = new Function("param1","param2","alert(param1+' '+param2)"); | |
pouet("Hello","World!") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (){ | |
/*mummy*/ | |
var mum = { | |
select:function(child){ | |
var thatChild = child; | |
return { | |
extends : function(parent){ | |
var instance = new parent; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*--- interfaces definition ---*/ | |
function IBase(){ | |
this.Id = ""; | |
} | |
function IHuman(){ | |
this.getName=function(){} | |
this.setName=function(){} | |
this.talking=function(){} | |
this.walking=function(){} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (){ | |
/*mummy*/ | |
var mum = { | |
select:function(child){ | |
var thatChild = child; | |
return { | |
extends : function(parent){ | |
var instance = new parent; | |
instance.constructor = thatChild.constructor; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width"> | |
<meta name="format-detection" content="false"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> | |
<title>joApp</title> | |
<link rel="stylesheet" href="css/jo.css" type="text/css"> | |
<link rel="apple-touch-icon" href="apple-touch-icon.png"> |
OlderNewer