Sha256: 07f1eb17b711c80170416ff57ccba9731e605c603097ce1879ca89dd848e695e

Contents?: true

Size: 615 Bytes

Versions: 24

Compression:

Stored size: 615 Bytes

Contents

class Wx::XmlResource
  # The standard .load method returns a boolean indicating success or
  # failure. Failure might result from bad XML, or a non-existent
  # file. In ruby, in these circumstances, it's more natural to raise an
  # Exception than expect the user to test the return value.
  wx_load = self.instance_method(:load)
  define_method(:load) do | fname |
    result = wx_load.bind(self).call(fname)
    if not result
      Kernel.raise( RuntimeError,
                    "Failed to load XRC from '#{fname}'; " +
                    "check the file exists and is valid XML")
    end
    fname
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
wxruby-1.9.5-i386-mswin32 lib/wx/classes/xmlresource.rb
wxruby-1.9.4-i386-mswin32 lib/wx/classes/xmlresource.rb
wxruby-1.9.3-i386-mswin32 lib/wx/classes/xmlresource.rb
wxruby-1.9.2-powerpc-darwin8.10.0 lib/wx/classes/xmlresource.rb
wxruby-1.9.2-i686-linux lib/wx/classes/xmlresource.rb
wxruby-1.9.2-i686-darwin8.8.2 lib/wx/classes/xmlresource.rb
wxruby-1.9.2-i386-mswin32 lib/wx/classes/xmlresource.rb
wxruby-1.9.1-powerpc-darwin8.3.0 lib/wx/classes/xmlresource.rb
wxruby-1.9.1-i686-linux lib/wx/classes/xmlresource.rb
wxruby-1.9.1-i686-darwin8.4.1 lib/wx/classes/xmlresource.rb
wxruby-1.9.1-i386-mswin32 lib/wx/classes/xmlresource.rb
wxruby-1.9.0-powerpc-darwin8.10.0 lib/wx/classes/xmlresource.rb
wxruby-1.9.0-i686-linux lib/wx/classes/xmlresource.rb
wxruby-1.9.0-i686-darwin8.4.1 lib/wx/classes/xmlresource.rb
wxruby-1.9.0-i386-mswin32 lib/wx/classes/xmlresource.rb
wxruby-1.9.1-x86_64-linux lib/wx/classes/xmlresource.rb
wxruby-1.9.2-x86_64-linux lib/wx/classes/xmlresource.rb
wxruby-1.9.3-universal-darwin lib/wx/classes/xmlresource.rb
wxruby-1.9.3-x86-linux lib/wx/classes/xmlresource.rb
wxruby-1.9.4-x86_64-linux lib/wx/classes/xmlresource.rb