search for: coll_class

Displaying 1 result from an estimated 1 matches for "coll_class".

Did you mean: colclass
2007 Apr 02
0
[937] trunk/wxsugar/lib/wx_sugar/enumerable_controls.rb: Initial commit of enumerable_controls.rb
...nable this behaviour +# for any classes; you should load it via the class extensions for +# +control_with_items.rb+ and +listctrl.rb+. +module WxSugar::EnumerableControl + include Enumerable + module ClassMethods + # Used internally to define a proxy object for items. + def collection(name, coll_class) + define_method(name) { coll_class.new(self) } + end + end + + def self.included(klass) + klass.extend ClassMethods + end + + # Iterates over the items in the control. In its simplest form, it + # passes the index of each item into the passed block: + # + # control.each | i |...