<br><br><div class="gmail_quote">On Thu, Feb 21, 2008 at 1:37 PM, David Temkin <<a href="mailto:temkin@laszlosystems.com">temkin@laszlosystems.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div style=""><div>The docs now say:</div><div><div><div><br></div><div><blockquote type="cite"><span style="color: rgb(51, 51, 51); font-family: Verdana; font-size: 12px; line-height: 18px;">When a state is removed, any children or constraints created when the state was applied are then removed, but attributes that were set by the application of the state are not restored.</span></blockquote>
</div><br></div><div>It sounds like this isn't quite right. Are event handlers also restored to their previous value when the state is removed? And then it says that constraints are removed, which does not seem to be consistent with current behavior. If "children" means "child views" then methods are excluded.</div>
</div></div></blockquote><div><br>There can be as many event handlers as you want registered to a given event, so the state can unregister<br>just the ones that it registered. They are "linearly additive" with each other, to use a physics analogy. <br>
<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div><div></div><div><br></div><div>We should be explicit about which elements of the <state> are applied, and which are removed or restored. </div>
<div><br></div><div>"Side effects" -- other attributes that have been changed by running application code, in the view that contains the state, or elsewhere -- are not part of the picture. </div><div><br></div><div>
I am unclear on what this means specifically: "It is an error for the state to specify any other properties of the attribute that would conflict with the parent." Tucker? </div><div></div></div></div></blockquote>
<div><br>For example, if you declared an attribute as a number type, then you can't have the state declare it as a string type.<br>Or if you have declared a setter for an attribute in the main view, the state shouldn;'t declare a different setter for it. <br>
<br><br><br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div><div><br></div><font color="#888888"><div>- D.</div><div>
<br></div><div><br></div></font></div><div><div></div><br></div></div></blockquote></div><br>