Mailing list archives: October 2002

Site index · List index
Message list1 · 2 · 3 · 4 · 5 · Next »Thread · Author · Date
ao.merseine.nu> and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Thu, 30 Jun, 05:20
ao.merseine.nu> and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Thu, 30 Jun, 05:20
chfeger cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Tue, 05 Oct, 13:38
j..@best.com> old[2]&lt;=col&lt;old[3]++forrowinxrange(min(old[0],start_row),max(old[1],end_row)):+forcolinxrange(min(old[2],start_col),max(old[2],end_col)):+cell_in_new=in_new(row,col)+cell_in_old=in_old(row,col)++ifcell_in_newandnotcell_in_old:+keys.add((row,col))+elifcell_in_oldandnotcell_in_new:+keys.remove((row,col))++++classTableColumn(InteractionComponent):+defget_value(self,item):</ins> Sat, 26 Oct, 11:43
sen n_old(row, col): + return old[0] &lt;= row &lt; old[1] and old[2] &lt;= col &lt; old[3] + + for row in xrange(min(old[0], start_row), max(old[1], end_row)): + for col in xrange(min(old[2], start_col), max(old[2], end_col)): + cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Sat, 26 Oct, 21:16
y d(row, col): + return old[0] &lt;= row &lt; old[1] and old[2] &lt;= col &lt; old[3] + + for row in xrange(min(old[0], start_row), max(old[1], end_row)): + for col in xrange(min(old[2], start_col), max(old[2], end_col)): + cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Sat, 14 Jun, 16:51
bk...@yahoo.com Column(InteractionComponent): + def get_value(self, item): </ins> Sat, 23 Jan, 20:15
bk...@yahoo.com Column(InteractionComponent): + def get_value(self, item): </ins> Sat, 23 Jan, 20:15
<mcfle...@rogers.com> end on the hour only line up Wed, 04 May, 01:07
<mcfle...@rogers.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Wed, 04 May, 01:07
<mcfle...@rogers.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Wed, 04 May, 01:07
<mcfle...@rogers.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Wed, 04 May, 01:07
<mcfle...@rogers.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Wed, 04 May, 01:07
<mcfle...@rogers.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Wed, 04 May, 01:07
<mcfle...@rogers.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Wed, 04 May, 01:07
="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Sun, 12 Jun, 00:34
="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Sun, 12 Jun, 00:34
="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Sun, 12 Jun, 00:34
="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Sun, 12 Jun, 00:34
="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Sun, 12 Jun, 00:34
="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Sun, 12 Jun, 00:34
="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Sun, 12 Jun, 00:34
="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Sun, 12 Jun, 00:34
="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Sun, 12 Jun, 00:34
o hen&amp;quot;, cells[&amp;quot;created&amp;quot;]) &lt;/span&gt;&lt;span class="cx"&gt; kw.setdefault(&amp;quot;what&amp;quot;, cells[&amp;quot;title&amp;quot;]) &lt;/span&gt;&lt;span class="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; ><del>- def display_name(self, item): - &quot;&quot;&quot;Hook for customizing item display&quot;&quot;&quot; </del><ins>+ def get_cell_value(self, (row, col)): + &quot;&quot;&quot;Get value at (row, col) in the table&quot;&quot;&quot; + self.items.changes # introduce dependency?!?! + try: + item = self.items[row] + column = self.columns[col] + except IndexError: + return None + else: + return column.get_value(item) + + visible_range_change = trellis.attr(resetting_to=(0, 0, 0, 0)) + + @trellis.maintain(initially=(0, 0, 0, 0)) + def visible_ranges(self): + visible_ranges = tuple(old + delta + for old, delta in zip(self.visible_ranges, + self.visible_range_change)) + if self.visible_ranges != visible_ranges: + self.set_visible_ranges(visible_ranges) + return visible_ranges + + @trellis.make + def observer(self): + return collections.Observing(lookup_func=self.get_cell_value) + + @trellis.modifier + def set_visible_ranges(self, (start_row, end_row, start_col, end_col)): + keys = self.observer.keys + old = self.visible_ranges + + def in_new(row, col): + return start_row &lt;= row &lt; end_row and start_col &lt;= col &lt; end_col + + def in_old(row, col): + return old[0] &lt;= row &lt; old[1] and old[2] &lt;= col &lt; old[3] + + for row in xrange(min(old[0], start_row), max(old[1], end_row)): + for col in xrange(min(old[2], start_col), max(old[2], end_col)): + cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Tue, 30 Sep, 22:22
mi...@kapor.com + trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Mon, 27 Oct, 05:30
mi...@kapor.com w/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Mon, 27 Oct, 05:30
mi...@kapor.com w/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Mon, 27 Oct, 05:30
mi...@kapor.com w/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com eColumn(InteractionComponent): + def get_value(self, item): </ins> Mon, 27 Oct, 05:30
mi...@kapor.com ÿÿ Mon, 27 Oct, 05:30
k...@keefandjain.com + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins> Sun, 31 May, 00:29
a lt;/span&gt;&lt;span class="lines"&gt;@@ -240,7 +205,7 @@ &lt;/span&gt;&lt;span class="cx"&gt; @classmethod &lt;/span&gt;&lt;span class="cx"&gt; def installed_on(cls, obj): &lt;/span&gt;&lt;span class="cx"&gt; try: &lt;/span&gt;&lt;del&gt;- obj = obj.__item &lt;/del&gt;&lt;ins&gt;+ obj = obj._item &lt;/ins&gt;&lt;span class="cx"&gt; except AttributeError: &lt;/span&gt;&lt;span class="cx"&gt; pass &lt;/span&gt;&lt;span class="cx"&gt; return isinstance(obj, Item) and cls in obj._extension_types &lt;/span&gt;&lt;span class="lines"&gt;@@ -258,6 +223,8 @@ &lt;/span&gt;&lt;span class="cx"&gt; if not isinstance(subject_item, Item): &lt;/span&gt;&lt;span class="cx"&gt; raise TypeError, &amp;quot;DashboardEntry's subject_item must be an Item&amp;quot; &lt;/span&gt;&lt;span class="cx"&gt; cells = trellis.Cells(subject_item) &lt;/span&gt;&lt;ins&gt;+ # touch created in case it's a rule and doesn't yet exist + subject_item.created &lt;/ins&gt;&lt;span class="cx"&gt; kw.setdefault(&amp;quot;when&amp;quot;, cells[&amp;quot;created&amp;quot;]) &lt;/span&gt;&lt;span class="cx"&gt; kw.setdefault(&amp;quot;what&amp;quot;, cells[&amp;quot;title&amp;quot;]) &lt;/span&gt;&lt;span class="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; ><del>- def display_name(self, item): - &quot;&quot;&quot;Hook for customizing item display&quot;&quot;&quot; </del><ins>+ def get_cell_value(self, (row, col)): + &quot;&quot;&quot;Get value at (row, col) in the table&quot;&quot;&quot; + self.items.changes # introduce dependency?!?! + try: + item = self.items[row] + column = self.columns[col] + except IndexError: + return None + else: + return column.get_value(item) + + visible_range_change = trellis.attr(resetting_to=(0, 0, 0, 0)) + + @trellis.maintain(initially=(0, 0, 0, 0)) + def visible_ranges(self): + visible_ranges = tuple(old + delta + for old, delta in zip(self.visible_ranges, + self.visible_range_change)) + if self.visible_ranges != visible_ranges: + self.set_visible_ranges(visible_ranges) + return visible_ranges + + @trellis.make + def observer(self): + return collections.Observing(lookup_func=self.get_cell_value) + + @trellis.modifier + def set_visible_ranges(self, (start_row, end_row, start_col, end_col)): + keys = self.observer.keys + old = self.visible_ranges + + def in_new(row, col): + return start_row &lt;= row &lt; end_row and start_col &lt;= col &lt; end_col + + def in_old(row, col): + return old[0] &lt;= row &lt; old[1] and old[2] &lt;= col &lt; old[3] + + for row in xrange(min(old[0], start_row), max(old[1], end_row)): + for col in xrange(min(old[2], start_col), max(old[2], end_col)): + cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Wed, 01 May, 09:09
<mwall...@allegroinfosystems.com> &gt;&lt;spanclass="cx"&gt;kw.setdefault(&amp;quot;when&amp;quot;,cells[&amp;quot;created&amp;quot;])&lt;/span&gt;&lt;spanclass="cx"&gt;kw.setdefault(&amp;quot;what&amp;quot;,cells[&amp;quot;title&amp;quot;])&lt;/span&gt;&lt;spanclass="cx"&gt;super(DashboardEntry,self).__init__(**kw)&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;> Wed, 05 Feb, 14:28
<n...@3dsafety.com> cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Sun, 05 Jun, 06:36
<n...@3dsafety.com> 07ad0@mail.student.math.uwaterloo.ca><7899.1035882266@www38.gmx.net> <7899.1035882266@www38.gmx.net><5.1.1.6.0.20021029072011.01c07ad0@mail.student.math.uwaterloo.ca> <5.1.1.6.2.20021029135610.023ecb38@shell3.shore.net> <1035934172.933.836.camel@fiawol> Sun, 05 Jun, 06:36
<joelfin...@hotmail.com> end on the hour only line up Tue, 26 Jul, 16:21
<joelfin...@hotmail.com> end on the hour only line up Tue, 26 Jul, 16:21
<joelfin...@hotmail.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Tue, 26 Jul, 16:21
<joelfin...@hotmail.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Tue, 26 Jul, 16:21
<joelfin...@hotmail.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Tue, 26 Jul, 16:21
<joelfin...@hotmail.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Tue, 26 Jul, 16:21
<joelfin...@hotmail.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Tue, 26 Jul, 16:21
<joelfin...@hotmail.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Tue, 26 Jul, 16:21
<joelfin...@hotmail.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Tue, 26 Jul, 16:21
<joelfin...@hotmail.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Tue, 26 Jul, 16:21
<joelfin...@hotmail.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Tue, 26 Jul, 16:21
<joelfin...@hotmail.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Tue, 26 Jul, 16:21
<joelfin...@hotmail.com> super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; > Tue, 26 Jul, 16:21
<joelfin...@hotmail.com> et><5.1.1.6.0.20021029072011.01c07ad0@mail.student.math.uwaterloo.ca> <5.1.1.6.2.20021029135610.023ecb38@shell3.shore.net> <1035934172.933.836.camel@fiawol> Tue, 26 Jul, 16:21
<ph...@TeamScope.com> except IndexError: + return None + else: + return column.get_value(item) + + visible_range_change = trellis.attr(resetting_to=(0, 0, 0, 0)) + + @trellis.maintain(initially=(0, 0, 0, 0)) + def visible_ranges(self): + visible_ranges = tuple(old + delta + for old, delta in zip(self.visible_ranges, + self.visible_range_change)) + if self.visible_ranges != visible_ranges: + self.set_visible_ranges(visible_ranges) + return visible_ranges + + @trellis.make + def observer(self): + return collections.Observing(lookup_func=self.get_cell_value) + + @trellis.modifier + def set_visible_ranges(self, (start_row, end_row, start_col, end_col)): + keys = self.observer.keys + old = self.visible_ranges + + def in_new(row, col): + return start_row &lt;= row &lt; end_row and start_col &lt;= col &lt; end_col + + def in_old(row, col): + return old[0] &lt;= row &lt; old[1] and old[2] &lt;= col &lt; old[3] + + for row in xrange(min(old[0], start_row), max(old[1], end_row)): + for col in xrange(min(old[2], start_col), max(old[2], end_col)): + cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Thu, 15 Sep, 05:33
<wshatt...@wwdb.org> eturn self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Sun, 23 Oct, 11:02
<wshatt...@wwdb.org> eturn self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Sun, 23 Oct, 11:02
<ka...@ugcs.caltech.edu> ll_value(self, (row, col)): + &quot;&quot;&quot;Get value at (row, col) in the table&quot;&quot;&quot; + self.items.changes # introduce dependency?!?! + try: + item = self.items[row] + column = self.columns[col] + except IndexError: + return None + else: + return column.get_value(item) + + visible_range_change = trellis.attr(resetting_to=(0, 0, 0, 0)) + + @trellis.maintain(initially=(0, 0, 0, 0)) + def visible_ranges(self): + visible_ranges = tuple(old + delta + for old, delta in zip(self.visible_ranges, + self.visible_range_change)) + if self.visible_ranges != visible_ranges: + self.set_visible_ranges(visible_ranges) + return visible_ranges + + @trellis.make + def observer(self): + return collections.Observing(lookup_func=self.get_cell_value) + + @trellis.modifier + def set_visible_ranges(self, (start_row, end_row, start_col, end_col)): + keys = self.observer.keys + old = self.visible_ranges + + def in_new(row, col): + return start_row &lt;= row &lt; end_row and start_col &lt;= col &lt; end_col + + def in_old(row, col): + return old[0] &lt;= row &lt; old[1] and old[2] &lt;= col &lt; old[3] + + for row in xrange(min(old[0], start_row), max(old[1], end_row)): + for col in xrange(min(old[2], start_col), max(old[2], end_col)): + cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Sat, 07 Jan, 09:57
<pcra...@yifan.net> except IndexError: + return None + else: + return column.get_value(item) + + visible_range_change = trellis.attr(resetting_to=(0, 0, 0, 0)) + + @trellis.maintain(initially=(0, 0, 0, 0)) + def visible_ranges(self): + visible_ranges = tuple(old + delta + for old, delta in zip(self.visible_ranges, + self.visible_range_change)) + if self.visible_ranges != visible_ranges: + self.set_visible_ranges(visible_ranges) + return visible_ranges + + @trellis.make + def observer(self): + return collections.Observing(lookup_func=self.get_cell_value) + + @trellis.modifier + def set_visible_ranges(self, (start_row, end_row, start_col, end_col)): + keys = self.observer.keys + old = self.visible_ranges + + def in_new(row, col): + return start_row &lt;= row &lt; end_row and start_col &lt;= col &lt; end_col + + def in_old(row, col): + return old[0] &lt;= row &lt; old[1] and old[2] &lt;= col &lt; old[3] + + for row in xrange(min(old[0], start_row), max(old[1], end_row)): + for col in xrange(min(old[2], start_col), max(old[2], end_col)): + cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Tue, 14 Feb, 14:14
<pcra...@yifan.net> except IndexError: + return None + else: + return column.get_value(item) + + visible_range_change = trellis.attr(resetting_to=(0, 0, 0, 0)) + + @trellis.maintain(initially=(0, 0, 0, 0)) + def visible_ranges(self): + visible_ranges = tuple(old + delta + for old, delta in zip(self.visible_ranges, + self.visible_range_change)) + if self.visible_ranges != visible_ranges: + self.set_visible_ranges(visible_ranges) + return visible_ranges + + @trellis.make + def observer(self): + return collections.Observing(lookup_func=self.get_cell_value) + + @trellis.modifier + def set_visible_ranges(self, (start_row, end_row, start_col, end_col)): + keys = self.observer.keys + old = self.visible_ranges + + def in_new(row, col): + return start_row &lt;= row &lt; end_row and start_col &lt;= col &lt; end_col + + def in_old(row, col): + return old[0] &lt;= row &lt; old[1] and old[2] &lt;= col &lt; old[3] + + for row in xrange(min(old[0], start_row), max(old[1], end_row)): + for col in xrange(min(old[2], start_col), max(old[2], end_col)): + cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Tue, 14 Feb, 14:14
bsi...@bellatlantic.net ndow/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Sat, 07 Apr, 02:32
bsi...@bellatlantic.net ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
bsi...@bellatlantic.net ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
bsi...@bellatlantic.net ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
bsi...@bellatlantic.net ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
bsi...@bellatlantic.net ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
bsi...@bellatlantic.net ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
bsi...@bellatlantic.net ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
bsi...@bellatlantic.net [No Subject] Sat, 07 Apr, 02:32
bsi...@bellatlantic.net [No Subject] Sat, 07 Apr, 02:32
si...@mail.med.upenn.edu ndow/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Sat, 07 Apr, 02:32
si...@mail.med.upenn.edu ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
si...@mail.med.upenn.edu ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
si...@mail.med.upenn.edu ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
si...@mail.med.upenn.edu ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
si...@mail.med.upenn.edu ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
si...@mail.med.upenn.edu ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
si...@mail.med.upenn.edu ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
si...@mail.med.upenn.edu ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
si...@mail.med.upenn.edu ableColumn(InteractionComponent): + def get_value(self, item): </ins> Sat, 07 Apr, 02:32
ovan mp;quot;, cells[&amp;quot;created&amp;quot;]) &lt;/span&gt;&lt;span class="cx"&gt; kw.setdefault(&amp;quot;what&amp;quot;, cells[&amp;quot;title&amp;quot;]) &lt;/span&gt;&lt;span class="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; ><del>- def display_name(self, item): - &quot;&quot;&quot;Hook for customizing item display&quot;&quot;&quot; </del><ins>+ def get_cell_value(self, (row, col)): + &quot;&quot;&quot;Get value at (row, col) in the table&quot;&quot;&quot; + self.items.changes # introduce dependency?!?! + try: + item = self.items[row] + column = self.columns[col] + except IndexError: + return None + else: + return column.get_value(item) + + visible_range_change = trellis.attr(resetting_to=(0, 0, 0, 0)) + + @trellis.maintain(initially=(0, 0, 0, 0)) + def visible_ranges(self): + visible_ranges = tuple(old + delta + for old, delta in zip(self.visible_ranges, + self.visible_range_change)) + if self.visible_ranges != visible_ranges: + self.set_visible_ranges(visible_ranges) + return visible_ranges + + @trellis.make + def observer(self): + return collections.Observing(lookup_func=self.get_cell_value) + + @trellis.modifier + def set_visible_ranges(self, (start_row, end_row, start_col, end_col)): + keys = self.observer.keys + old = self.visible_ranges + + def in_new(row, col): + return start_row &lt;= row &lt; end_row and start_col &lt;= col &lt; end_col + + def in_old(row, col): + return old[0] &lt;= row &lt; old[1] and old[2] &lt;= col &lt; old[3] + + for row in xrange(min(old[0], start_row), max(old[1], end_row)): + for col in xrange(min(old[2], start_col), max(old[2], end_col)): + cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Sat, 07 Apr, 13:15
ovan mp;quot;, cells[&amp;quot;created&amp;quot;]) &lt;/span&gt;&lt;span class="cx"&gt; kw.setdefault(&amp;quot;what&amp;quot;, cells[&amp;quot;title&amp;quot;]) &lt;/span&gt;&lt;span class="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; ><del>- def display_name(self, item): - &quot;&quot;&quot;Hook for customizing item display&quot;&quot;&quot; </del><ins>+ def get_cell_value(self, (row, col)): + &quot;&quot;&quot;Get value at (row, col) in the table&quot;&quot;&quot; + self.items.changes # introduce dependency?!?! + try: + item = self.items[row] + column = self.columns[col] + except IndexError: + return None + else: + return column.get_value(item) + + visible_range_change = trellis.attr(resetting_to=(0, 0, 0, 0)) + + @trellis.maintain(initially=(0, 0, 0, 0)) + def visible_ranges(self): + visible_ranges = tuple(old + delta + for old, delta in zip(self.visible_ranges, + self.visible_range_change)) + if self.visible_ranges != visible_ranges: + self.set_visible_ranges(visible_ranges) + return visible_ranges + + @trellis.make + def observer(self): + return collections.Observing(lookup_func=self.get_cell_value) + + @trellis.modifier + def set_visible_ranges(self, (start_row, end_row, start_col, end_col)): + keys = self.observer.keys + old = self.visible_ranges + + def in_new(row, col): + return start_row &lt;= row &lt; end_row and start_col &lt;= col &lt; end_col + + def in_old(row, col): + return old[0] &lt;= row &lt; old[1] and old[2] &lt;= col &lt; old[3] + + for row in xrange(min(old[0], start_row), max(old[1], end_row)): + for col in xrange(min(old[2], start_col), max(old[2], end_col)): + cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Sat, 07 Apr, 13:15
ovan mp;quot;, cells[&amp;quot;created&amp;quot;]) &lt;/span&gt;&lt;span class="cx"&gt; kw.setdefault(&amp;quot;what&amp;quot;, cells[&amp;quot;title&amp;quot;]) &lt;/span&gt;&lt;span class="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; ><del>- def display_name(self, item): - &quot;&quot;&quot;Hook for customizing item display&quot;&quot;&quot; </del><ins>+ def get_cell_value(self, (row, col)): + &quot;&quot;&quot;Get value at (row, col) in the table&quot;&quot;&quot; + self.items.changes # introduce dependency?!?! + try: + item = self.items[row] + column = self.columns[col] + except IndexError: + return None + else: + return column.get_value(item) + + visible_range_change = trellis.attr(resetting_to=(0, 0, 0, 0)) + + @trellis.maintain(initially=(0, 0, 0, 0)) + def visible_ranges(self): + visible_ranges = tuple(old + delta + for old, delta in zip(self.visible_ranges, + self.visible_range_change)) + if self.visible_ranges != visible_ranges: + self.set_visible_ranges(visible_ranges) + return visible_ranges + + @trellis.make + def observer(self): + return collections.Observing(lookup_func=self.get_cell_value) + + @trellis.modifier + def set_visible_ranges(self, (start_row, end_row, start_col, end_col)): + keys = self.observer.keys + old = self.visible_ranges + + def in_new(row, col): + return start_row &lt;= row &lt; end_row and start_col &lt;= col &lt; end_col + + def in_old(row, col): + return old[0] &lt;= row &lt; old[1] and old[2] &lt;= col &lt; old[3] + + for row in xrange(min(old[0], start_row), max(old[1], end_row)): + for col in xrange(min(old[2], start_col), max(old[2], end_col)): + cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Sat, 07 Apr, 13:15
ovan mp;quot;, cells[&amp;quot;created&amp;quot;]) &lt;/span&gt;&lt;span class="cx"&gt; kw.setdefault(&amp;quot;what&amp;quot;, cells[&amp;quot;title&amp;quot;]) &lt;/span&gt;&lt;span class="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; ><del>- def display_name(self, item): - &quot;&quot;&quot;Hook for customizing item display&quot;&quot;&quot; </del><ins>+ def get_cell_value(self, (row, col)): + &quot;&quot;&quot;Get value at (row, col) in the table&quot;&quot;&quot; + self.items.changes # introduce dependency?!?! + try: + item = self.items[row] + column = self.columns[col] + except IndexError: + return None + else: + return column.get_value(item) + + visible_range_change = trellis.attr(resetting_to=(0, 0, 0, 0)) + + @trellis.maintain(initially=(0, 0, 0, 0)) + def visible_ranges(self): + visible_ranges = tuple(old + delta + for old, delta in zip(self.visible_ranges, + self.visible_range_change)) + if self.visible_ranges != visible_ranges: + self.set_visible_ranges(visible_ranges) + return visible_ranges + + @trellis.make + def observer(self): + return collections.Observing(lookup_func=self.get_cell_value) + + @trellis.modifier + def set_visible_ranges(self, (start_row, end_row, start_col, end_col)): + keys = self.observer.keys + old = self.visible_ranges + + def in_new(row, col): + return start_row &lt;= row &lt; end_row and start_col &lt;= col &lt; end_col + + def in_old(row, col): + return old[0] &lt;= row &lt; old[1] and old[2] &lt;= col &lt; old[3] + + for row in xrange(min(old[0], start_row), max(old[1], end_row)): + for col in xrange(min(old[2], start_col), max(old[2], end_col)): + cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Sat, 07 Apr, 13:15
<jfo...@freenet.de> gt;@@ -258,6 +223,8 @@ &lt;/span&gt;&lt;span class="cx"&gt; if not isinstance(subject_item, Item): &lt;/span&gt;&lt;span class="cx"&gt; raise TypeError, &amp;quot;DashboardEntry's subject_item must be an Item&amp;quot; &lt;/span&gt;&lt;span class="cx"&gt; cells = trellis.Cells(subject_item) &lt;/span&gt;&lt;ins&gt;+ # touch created in case it's a rule and doesn't yet exist + subject_item.created &lt;/ins&gt;&lt;span class="cx"&gt; kw.setdefault(&amp;quot;when&amp;quot;, cells[&amp;quot;created&amp;quot;]) &lt;/span&gt;&lt;span class="cx"&gt; kw.setdefault(&amp;quot;what&amp;quot;, cells[&amp;quot;title&amp;quot;]) &lt;/span&gt;&lt;span class="cx"&gt; super(DashboardEntry, self).__init__(**kw) &lt;/span&gt;&lt;/span&gt;&lt;/pre&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; ><del>- def display_name(self, item): - &quot;&quot;&quot;Hook for customizing item display&quot;&quot;&quot; </del><ins>+ def get_cell_value(self, (row, col)): + &quot;&quot;&quot;Get value at (row, col) in the table&quot;&quot;&quot; + self.items.changes # introduce dependency?!?! + try: + item = self.items[row] + column = self.columns[col] + except IndexError: + return None + else: + return column.get_value(item) + + visible_range_change = trellis.attr(resetting_to=(0, 0, 0, 0)) + + @trellis.maintain(initially=(0, 0, 0, 0)) + def visible_ranges(self): + visible_ranges = tuple(old + delta + for old, delta in zip(self.visible_ranges, + self.visible_range_change)) + if self.visible_ranges != visible_ranges: + self.set_visible_ranges(visible_ranges) + return visible_ranges + + @trellis.make + def observer(self): + return collections.Observing(lookup_func=self.get_cell_value) + + @trellis.modifier + def set_visible_ranges(self, (start_row, end_row, start_col, end_col)): + keys = self.observer.keys + old = self.visible_ranges + + def in_new(row, col): + return start_row &lt;= row &lt; end_row and start_col &lt;= col &lt; end_col + + def in_old(row, col): + return old[0] &lt;= row &lt; old[1] and old[2] &lt;= col &lt; old[3] + + for row in xrange(min(old[0], start_row), max(old[1], end_row)): + for col in xrange(min(old[2], start_col), max(old[2], end_col)): + cell_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Thu, 05 Jul, 11:27
l_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Wed, 18 Jul, 08:37
l_in_new = in_new(row, col) + cell_in_old = in_old(row, col) + + if cell_in_new and not cell_in_old: + keys.add((row, col)) + elif cell_in_old and not cell_in_new: + keys.remove((row, col)) + + + +class TableColumn(InteractionComponent): + def get_value(self, item): </ins><span class="cx"> return unicode(item) </span><span class="cx"> </span><del>-class _RuleCell(trellis.Cell): - def get_value(self): - return self.rule().get_value() - def set_value(self, value): - return self.rule().set_value(value) - value = property(get_value, set_value) </del><ins>+ def sort_key(self, item): + return self.get_value(item) </ins><span class="cx"> </span><del>-class Scope(trellis.Component): - model = trellis.attr(None) - features = Many(inverse=Feature.scope) </del><ins>+ trellis.attrs( + can_sort=True, + sort_ascending=False, + ) </ins><span class="cx"> </span><del>- def make_model_cell(self, attr): - return _RuleCell(lambda: trellis.Cells(self.model)[attr]) </del><ins>+class Frame(Scope): + &quot;&quot;&quot;A top-level window/dialog in the UI&quot;&quot;&quot; + pass </ins><span class="cx"> </span><del>- </del><span class="cx"> #### Utility ##### </span><span class="cx"> </span><span class="cx"> class Viewer(trellis.Component): </span></span></pre> </div> </div> </body> </html> Wed, 18 Jul, 08:37
Message list1 · 2 · 3 · 4 · 5 · Next »Thread · Author · Date
Box list
Jan 200827
Dec 2007224
Nov 2007217
Oct 2007105
Sep 200793
Aug 200727
Jul 2007105
Jun 2007108
May 2007292
Apr 2007276
Mar 2007275
Feb 2007303
Jan 2007183
Dec 2006232
Nov 2006183
Oct 200697
Sep 2006163
Aug 2006162
Jul 2006265
Jun 2006136
May 2006105
Apr 2006208
Mar 2006229
Feb 2006230
Jan 2006260
Dec 2005128
Nov 2005246
Oct 2005123
Sep 200572
Aug 200524
Jul 200517
Jun 20054
May 200520
Apr 20059
Mar 200519
Feb 200514
Jan 200548
Dec 200448
Nov 200410
Oct 20043
Aug 200411
Jul 20045
Jun 200412
May 20041
Apr 200421
Mar 200419
Feb 20047
Jan 200463
Dec 200344
Nov 200335
Oct 200343
Sep 200338
Aug 200354
Jul 200314
Jun 200360
May 2003125
Apr 2003117
Mar 2003166
Feb 2003220
Jan 2003408
Dec 2002297
Nov 2002728
Oct 2002479