Index: doc/langRef.xotcl =================================================================== diff -u -r4ee91650a20c8b8097bd70448aa5a36b0a7f6f16 -r5d5e792f4a7f64411aa0537f4677ae96dea4432f --- doc/langRef.xotcl (.../langRef.xotcl) (revision 4ee91650a20c8b8097bd70448aa5a36b0a7f6f16) +++ doc/langRef.xotcl (.../langRef.xotcl) (revision 5d5e792f4a7f64411aa0537f4677ae96dea4432f) @@ -1408,11 +1408,16 @@ ?args? "arbitrary arguments" } { description { - Hook called upon recreation of an object. Performs standard object - initialization, per default. May be overloaded/-written. It calls - another method cleanup which handles actual cleanup of the object - during next. That means, if you overload recreate, in the pre-part - the object still contains its old state, after next it is cleaned up. + Methods called upon recreation of an object. Recreate is called, + when an object/class is created, but a same-named object/class + exists already. "recreate" is not called, when an object is trying + to be recreated as a class or vice versa. In these cases, + recreating is realized via destroy+create. The Methods "recreate" + performs standard object initialization, per default. May be + overloaded/-written. It calls another method cleanup which handles + actual cleanup of the object during next. That means, if you + overload recreate, in the pre-part the object still contains its + old state, after next it is cleaned up. } return "obj name" } Index: doc/tutorial.html =================================================================== diff -u -rc2f6b67e7b36f9b7f9e69362420ce572847df18e -r5d5e792f4a7f64411aa0537f4677ae96dea4432f --- doc/tutorial.html (.../tutorial.html) (revision c2f6b67e7b36f9b7f9e69362420ce572847df18e) +++ doc/tutorial.html (.../tutorial.html) (revision 5d5e792f4a7f64411aa0537f4677ae96dea4432f) @@ -1765,7 +1765,7 @@
- recreate can be customized e.g. by overloading or interception. - By default it calls cleanup followed by doInitializations. + The method recreate can be customized like all other + XOTcl methods (e.g. by overloading or interception). + By default create calls cleanup followed by + doInitializations. +
++ Note, that recreate is not called, when a someone tries + to recreate a class as an object or an object as a class. In these + cases, destroy + create are used. +
+ Class c + Object c ;# here, "c" is downgraded to an object, no "recreate" is called +
-In both cases, the method doInitializations +For create and recreate, the method doInitializations is called automatically from C and has the following default behavior: