Sha256: ab398fc7ee43b21a50005ba7196fa64d4ebda92d0bb40ab80e08501aea6493a4

Contents?: true

Size: 341 Bytes

Versions: 23

Compression:

Stored size: 341 Bytes

Contents

# Superclass of a variety of controls that display lists of items (eg
# Choice, ListBox, CheckListBox)
class Wx::ControlWithItems
  # Make these ruby enumerables so find, find_all, map etc are available 
  include Enumerable
  # Passes each valid item index into the passed block
  def each
    0.upto(count - 1) { | i | yield i }
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
wxruby-1.9.7-universal-darwin-9 lib/wx/classes/controlwithitems.rb
wxruby-1.9.7-x86-linux lib/wx/classes/controlwithitems.rb
wxruby-1.9.7-x86-mswin32-60 lib/wx/classes/controlwithitems.rb