资 源 简 介
A JavaScript Class which simulates delegates in other more strongly type-oriented languages.
I will write the instructions as soon as possible, meantime I copy-paste my code here:
```
//create a Delegate object
var del1 = new Delegate({
firstFunction : function () {
alert("First function...");
},
secondFunction : function () {
alert("Second function...");
}
}, {
name : "first_delegate",
initRun : true,
errorReport : "alert"
});
//create a second Delegate object
var del2 = new Delegate({
thirdFunction : function () {
alert("First function...");
},
fourthFunction : function () {
alert("Second function...");
}
}, {
name : "second_delegate",
errorReport : "alert"
});
var del3 = del2.clone({
name : "cloned_delegate",
initRun : true
});
var del4 = del1.clone()
del4.setCollection({
del4function1 : function () {
alert("del4function1");
},
del4fu