### In Files

- wx/accessors.rb

### Methods

- method_missing

### Files

- wxruby2.lib

### Class Index

Quicksearch

- Wx
- Wx::AcceleratorTable
- Wx::Animation
- Wx::App
- Wx::ArtProvider
- Wx::AuiNotebook
- Wx::Bitmap
- Wx::BusyCursor
- Wx::CheckListBox
- Wx::Choice
- Wx::ClientDC
- Wx::Clipboard
- Wx::Colour
- Wx::ComboBox
- Wx::CommandEvent
- Wx::ControlWithItems
- Wx::DC
- Wx::Event
- Wx::EvtHandler
- Wx::Font
- Wx::Grid
- Wx::HelpController
- Wx::HelpControllerHelpProvider
- Wx::HelpProvider
- Wx::HtmlHelpController
- Wx::HtmlWindow
- Wx::Icon
- Wx::IconBundle
- Wx::Image
- Wx::ImageList
- Wx::KeywordConstructor
- Wx::KeywordConstructor::ClassMethods
- Wx::ListBox
- Wx::ListCtrl
- Wx::Locale
- Wx::MediaCtrl
- Wx::Menu
- Wx::MenuItem
- Wx::Notebook
- Wx::Object
- Wx::PaintDC
- Wx::Point
- Wx::PreviewFrame
- Wx::Rect
- Wx::RichTextCtrl
- Wx::SimpleHelpProvider
- Wx::Size
- Wx::Sizer
- Wx::Sound
- Wx::StandardPaths
- Wx::TextCtrl
- Wx::TextUrlEvent
- Wx::Timer
- Wx::ToolBar
- Wx::ToolBarTool
- Wx::TreeCtrl
- Wx::Window
- Wx::XmlResource
- Rumix
- Rumix::Application
- Rumix::Config
- Rumix::Registry
- Rumix::Widget
- Rumix::Widget::CheckOptionPanel
- Rumix::Widget::OptionItem
- Rumix::Widget::OptionPanel
- Rumix::Widget::RadioOptionPanel
- Rumix::Widget::TitleText
- ROpt
- ROpt::ArgumentParser
- ROpt::ParseResult
- Uconv
- Uconv::Error
- Enumerable
- File
- Ini
- Kernel
- Module
- Object
- Pathname
- WxConstructor
- WxRubyStyleAccessors

No matching classes.

# WxRubyStyleAccessors

# WxSugar - Accessors

The default WxRuby interface has lots and lots of methods like

     * get_position()
     * set_size(a_size)
     * is_checked()

and so on. Methods that retrieve set, or query attributes of an object are more normally in Ruby called simply by the attribute name:

     * position()
     * size = a_size
     * checked?

This extension creates an alias for every WxRuby instance method that begins with `get_`, `set_` or `is_`. Note that if you are calling a ‘setter’ method on self, you must explicitly send the message to self:

     # set's self size to be 100px by 100px
     self.size = Wx::Size.new(100, 100)
     # only sets the value of a local variable 'size'
     size = Wx::Size.new

### Public Instance Methods

method_missing(sym, *args) click to toggle source

(Not documented)

    # File wx/accessors.rb, line 26
      def method_missing(sym, *args)
        case sym.to_s
        when /^(.*)\=$/
          meth = "set_#{$1}"
        when /^(.*)\?$/
          meth = "is_#{$1}"
        else
          meth = "get_#{sym}"
        end
        if respond_to?(meth)
          send(meth, *args)
        else
          e = NoMethodError.new("undefined method '#{sym}' for #{self.inspect}")
          e.set_backtrace(caller)
          Kernel.raise e
        end
      end

Disabled; run with $DEBUG to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.