return;\r
};\r
killPrivateFlag = false; // onKill 内で PrivateInstance.kill() を防ぐため\r
- X.Type.isFunction( instance.onKill ) === true && instance.onKill();\r
+ // onKill() === false の場合、kill のキャンセル\r
+ // private は false での キャンセル は無視される\r
+ if( X.Type.isFunction( instance.onKill ) && instance.onKill() === false && !def.isPrivate ){\r
+ return;\r
+ };\r
for( p in instance ){\r
if( instance.hasOwnProperty && !instance.hasOwnProperty( p ) ) continue;\r
delete instance[ p ];\r
def.userList.splice( i, 1 );\r
};\r
};\r
- // myCallback の削除\r
- // myCallback を受け取った API への通知\r
},\r
instanceOf : function( klass ){\r
var Super = this;\r
def.live && def.live.push( instance );\r
};\r
if( def.Super ){\r
+ // klass.prototype に移動\r
instance.Super = def.SuperProto;\r
instance.SuperConstructor = superConstructor;\r
};\r
};\r
\r
function superConstructor(){\r
- X.Class._getClassDef( this ).SuperConstructor.apply( this, arguments );\r
+ var s = X.Class._getClassDef( this ).SuperConstructor;\r
+ s && s.apply( this, arguments );\r
};\r
\r
return {\r