<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Here's what I came up with.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>DynamicBindings&gt;&gt;snapshot<BR>&nbsp;"returns 
an identity dictionary with a flattened view of me to be saved for 
later"<BR>&nbsp;|dictionary tmp|<BR>&nbsp;dictionary _ IdentityDictionary 
new.<BR>&nbsp;tmp _ self.<BR>&nbsp;[tmp isNil not] whileTrue: [tmp 
keysAndValuesDo: [:k :v |<BR>&nbsp;&nbsp; dictionary at: k ifAbsentPut: v]. tmp 
_ tmp parent].<BR>&nbsp;^ dictionary</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>Derek Brans<BR>Nerd on a Wire<BR>Web design that's anything but 
square<BR><A href="http://www.nerdonawire.com">http://www.nerdonawire.com</A> 
<BR>phone: 604.874.6463<BR>mailto: <A 
href="mailto:brans@nerdonawire.com">brans@nerdonawire.com</A><BR></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=brans@nerdonawire.com href="mailto:brans@nerdonawire.com">Derek 
  Brans</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A 
  title=squeak-dev@lists.squeakfoundation.org 
  href="mailto:squeak-dev@lists.squeakfoundation.org">The general-purpose Squeak 
  developers list</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, April 25, 2003 11:32 
  AM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> DynamicBindings - how to get a 
  snapshot</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=Arial size=2>Hi Stephen,</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>I don't know if this is poor programming 
  practice, but I want to take a snapshot of the bindings in one context and 
  store them as an instance variable, to be used in another 
  context.&nbsp;</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Doing that I can answer questions like: 
  </FONT></DIV>
  <DIV><FONT face=Arial size=2>Who was my parent component at rendering 
  time?&nbsp; Which component was named "containerA" at rendering 
  time?</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Could you tell me if this is a misuse of 
  DynamicBindings and if not, how to take a snapshot?</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Thank you,</FONT></DIV>
  <DIV><FONT face=Arial size=2>Derek</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Derek Brans<BR>Nerd on a Wire<BR>Web design 
  that's anything but square<BR><A 
  href="http://www.nerdonawire.com">http://www.nerdonawire.com</A> <BR>phone: 
  604.874.6463<BR>mailto: <A 
  href="mailto:brans@nerdonawire.com">brans@nerdonawire.com</A><BR></FONT></DIV>
  <P>
  <HR>

  <P></P><BR></BLOCKQUOTE></BODY></HTML>