Index: library/serialize/Serializer.xotcl =================================================================== diff -u -rc72f9f638677608fab1502cd696c8f2d6b2952f9 -r46f02e4868e118466d888b35d6b281b3f2ba31ac --- library/serialize/Serializer.xotcl (.../Serializer.xotcl) (revision c72f9f638677608fab1502cd696c8f2d6b2952f9) +++ library/serialize/Serializer.xotcl (.../Serializer.xotcl) (revision 46f02e4868e118466d888b35d6b281b3f2ba31ac) @@ -1,4 +1,4 @@ -# $Id: Serializer.xotcl,v 1.19 2007/10/05 09:06:00 neumann Exp $ +# $Id: Serializer.xotcl,v 1.15 2006/09/27 08:12:40 neumann Exp $ package require XOTcl 1.5 package provide xotcl::serializer 1.0 @@ -15,7 +15,7 @@ authors { Gustaf Neumann, Gustaf.Neumann@wu-wien.ac.at } - date { $Date: 2007/10/05 09:06:00 $ } + date { $Date: 2006/09/27 08:12:40 $ } } @ Serializer proc all { @@ -343,9 +343,7 @@ Serializer instproc Class-needsNothing x { if {![my Object-needsNothing $x]} {return 0} - set scs [$x info superclass] - if {[my needsOneOf $scs]} {return 0} - foreach sc $scs {if {[my needsOneOf [$sc info slots]]} {return 0}} + if {[my needsOneOf [$x info superclass]]} {return 0} #if {[my needsOneOf [$x info instmixin ]]} {return 0} return 1 } @@ -397,7 +395,7 @@ # (3) re-activating the traces after variable initialization set exports "" - set pre_cmds "" + set pre_cmds "::xotcl::Object instproc trace args {}\n" # delete ::xotcl from the namespace list, if it exists... catch {unset namespace(::xotcl)} @@ -414,7 +412,7 @@ } } - #append post_cmds "::xotcl::alias ::xotcl::Object trace -objscope ::trace\n" + append post_cmds "::xotcl::alias ::xotcl::Object trace -objscope ::trace\n" return $pre_cmds$result$post_cmds$exports } Serializer instproc deepSerialize o { @@ -489,7 +487,6 @@ my exportMethods [list ::xotcl::Object proc __exitHandler] set r { set ::xotcl::__filterstate [::xotcl::configure filter off] - ::xotcl::Object instproc trace args {} ::xotcl::Slot instmixin add ::xotcl::Slot::Nocheck } append r "::xotcl::configure softrecreate [::xotcl::configure softrecreate]" @@ -507,7 +504,6 @@ } } append r { - ::xotcl::alias ::xotcl::Object trace -objscope ::trace ::xotcl::Slot instmixin delete ::xotcl::Slot::Nocheck ::xotcl::configure filter $::xotcl::__filterstate unset ::xotcl::__filterstate @@ -521,8 +517,7 @@ } Serializer proc deepSerialize args { set s [my new -childof [self] -volatile] - set nr [eval $s configure $args] - foreach o [lrange $args 0 [incr nr -1]] { + foreach o [eval $s configure $args] { append r [$s deepSerialize [$o]] } if {[$s exists map]} {return [string map [$s map] $r]}