Sha256: 23f3f3365e7d7c859983bd83e11519026c65f3eca2ab02d1812a0ad7d26aaeee

Contents?: true

Size: 701 Bytes

Versions: 43

Compression:

Stored size: 701 Bytes

Contents

class Wx::Animation < Wx::GDIObject
  # Redefine the initialize method so it raises an exception if a
  # non-existent file is given to the constructor; otherwise, wx Widgets
  # just carries on with an empty bitmap, which may cause faults later
  wx_init = self.instance_method(:initialize)
  define_method(:initialize) do | *args |
    if args[0].kind_of? String
      if not File.exist?( File.expand_path(args[0]) )
        Kernel.raise( ArgumentError, 
                      "Animation file does not exist: #{args[0]}" )
      end
      res = wx_init.bind(self).call()
      res.load_file(args[0], args[1] || Wx::ANIMATION_TYPE_ANY)
    else
      wx_init.bind(self).call(*args)
    end
  end
end

Version data entries

43 entries across 43 versions & 3 rubygems

Version Path
wxruby-1.9.7-x86-mswin32-60 lib/wx/classes/animation.rb
wxruby-1.9.8-universal-darwin-9 lib/wx/classes/animation.rb
wxruby-1.9.8-x86-mingw32 lib/wx/classes/animation.rb
wxruby-1.9.8-x86-linux lib/wx/classes/animation.rb
wxruby-1.9.8-x86-mswin32-60 lib/wx/classes/animation.rb
wxruby-1.9.8-x86_64-linux lib/wx/classes/animation.rb
wxruby-1.9.9-universal-darwin-9 lib/wx/classes/animation.rb
wxruby-1.9.9-x86-linux lib/wx/classes/animation.rb
wxruby-1.9.9-x86-mingw32 lib/wx/classes/animation.rb
wxruby-1.9.9-x86-mswin32-60 lib/wx/classes/animation.rb
wxruby-2.0.0-universal-darwin-9 lib/wx/classes/animation.rb
wxruby-2.0.0-x86-linux lib/wx/classes/animation.rb
wxruby-2.0.0-x86-mingw32 lib/wx/classes/animation.rb
wxruby-2.0.0-x86-mswin32-60 lib/wx/classes/animation.rb
wxruby-2.0.0-x86_64-linux lib/wx/classes/animation.rb
wxruby-ruby19-1.9.10-x86-darwin-9 lib/wx/classes/animation.rb
wxruby-ruby19-1.9.10-x86-mingw32 lib/wx/classes/animation.rb
wxruby-ruby19-1.9.10-x86-linux lib/wx/classes/animation.rb
wxruby-ruby19-1.9.8-x86-darwin-9 lib/wx/classes/animation.rb
wxruby-ruby19-2.0.0-x86-darwin-9 lib/wx/classes/animation.rb