Displaying 2 results from an estimated 2 matches for "itemcollect".
2007 Apr 02
0
[937] trunk/wxsugar/lib/wx_sugar/enumerable_controls.rb: Initial commit of enumerable_controls.rb
...ems in the control for which the passed block
+ # evaluates to +true+.
+ def delete_if
+ deletions = []
+ each { | i | deletions << i if yield i }
+ deletions.reverse.each { | i | delete(i) }
+ end
+
+ # These classes provide proxy accessors for items within the control.
+ class ItemCollection
+ attr_reader :cwi
+ def initialize(cwi)
+ @cwi = cwi
+ end
+ end
+
+ # A proxy class for the item_data functions.
+ class ItemDataCollection < ItemCollection
+ def each
+ cwi.each { | i | yield cwi.get_item_data(i) }
+ end
+
+ def [](i)
+ cwi.get_item_da...
2007 Apr 03
0
[943] trunk/wxsugar/lib/wx_sugar/enumerable_controls.rb: Fix bug with false positives from #find_string, bounds-checking for
...pan class="lines">@@ -72,11 +73,35 @@
</span><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> # These classes provide proxy accessors for items within the control.
</span><ins>+ # ItemCollection is an abstract base class.
</ins><span class="cx"> class ItemCollection
</span><span class="cx"> attr_reader :cwi
</span><span class="cx"> def initialize(cwi)
</span><span class="cx"> @cwi =...