Thank you Phillip, <br>now it is all clearer.<br><br><br><div class="gmail_quote">On Thu, Apr 17, 2008 at 6:27 PM, Phillip J. Eby &lt;<a href="mailto:pje@telecommunity.com">pje@telecommunity.com</a>&gt; 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 class="Ih2E3d">At 09:23 AM 4/17/2008 +0300, Peter Damoc wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
 &nbsp; &nbsp;@trellis.observer<br>
 &nbsp; &nbsp;def updateView(self):<br>
 &nbsp; &nbsp; &nbsp; &nbsp;x = len(self.records) # needed to monitor changes<br>
 &nbsp; &nbsp; &nbsp; &nbsp;self.filtered_records = [x for x in self.records]<br>
</blockquote>
<br></div>
You can&#39;t modify trellis data in an observer. &nbsp;Move this line to a rule of its own, and change it to:<br>
<br>
 &nbsp; &nbsp;@trellis.rule<br>
 &nbsp; &nbsp;def do_filtering(self):<br>
 &nbsp; &nbsp; &nbsp; &nbsp;self.filtered_records.clear()<br>
 &nbsp; &nbsp; &nbsp; &nbsp;self.filtered_records.update(x for x in self.records if x...)<br>
<br>
This way, the same set object will be updated in-place. &nbsp;Your observer should now check &#39;self.sorted_records.changes&#39; instead of &#39;len(self.records)&#39; to ensure it&#39;s triggered when a change occurs.<br>
<br>
Meanwhile, the reason that you&#39;re getting a conflict is because you are assigning different values to the filtered_records attribute in two places during the same calculation.<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br>There is NO FATE, we are the creators.