<html><body>
<p>I'm using XOTcl objects to control hardware, and I'm trying to use the Serializer to persist hardware configurations.  However, I've run into a couple of issues.<br>
<br>
1) Not all of the object state is the consistent across serialization/deserialization.  The hardware handle, for instance, may not be the same at deserialization time as it was when serialization occurred. What I'd like to do is remap some member variables to un-substituted variables (&quot;-set hwhandle $handle&quot; instead of &quot;-set hwhandle 0x1234&quot;), and then I'll set the variable to the correct value when restoring the configuration. I see a way to ignore variables and a way to remap object names, but is there a way to remap variables?  Short of a global regsub on &quot;Serializer deepSerialize&quot; return result, that is?<br>
<br>
2) The serializer bypasses initialization (-noinit), and basically just restores the internal state of the object.  But in my application, I need to bring the hardware state into sync with the xotcl object, so just setting xotcl state variables doesn't suffice. Is there an easy way when deserializing to have some code executed after the object's state has all been restored?  Something like a -noinit flag, but instead have a custom -init?<br>
<br>
Maybe instead of &quot;-noinit&quot;, objects should have a &quot;-init method&quot; flag that determines the initialization mechanism?  If the flag is not set, or is set to &quot;init&quot;, the &quot;init&quot; method is invoked (default behavior), if the flag is set to some arbitrary method (&quot;-init hwsync&quot;), that arbitrary method gets invoked, and if the flag is set to an empty list (&quot;-init {}&quot;), no init method is invoked. <br>
<br>
        Scott<br>
<br>
<hr width="100%" size="2" align="left" style="color:#000000; "><b><font size="4" face="Arial">Notice</font></b><font size="4" face="Arial"> </font><br>
<font size="1" color="#202020" face="Times New Roman">The information in this message is confidential and may be legally privileged.  It is intended solely for the addressee.  Access to this message by anyone else is unauthorized.  If you are not the intended recipient,  any disclosure,  copying or distribution of the message,  or any action taken by you in reliance on it,  is prohibited and may be unlawful.  If you have received this message in error,  please delete it and contact the sender immediately.  Thank you.</font><br>
</body></html>