Sha256: 25b70e70da62e65ef8d6a5e572cbf748c1e714f4780a0bf8b2a00e4ee5fe82a8

Contents?: true

Size: 581 Bytes

Versions: 121

Compression:

Stored size: 581 Bytes

Contents

module Fox
  FXWindow.subclasses.each do |klass|
    klass.send(:alias_method, :create_without_parent_created_check, :create)
    klass.send(:define_method, :create) do
      unless parent.created?
        raise RuntimeError, "trying to create window before creating parent window"
      end
      if owner && !owner.created?
        raise RuntimeError, "trying to create window before creating owner window"
      end
      if visual.nil?
        raise RuntimeError, "trying to create window without a visual"
      end
      create_without_parent_created_check
    end
  end
end

Version data entries

121 entries across 121 versions & 2 rubygems

Version Path
fxruby-1.6.48 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.48-x64-mingw32 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.48-x64-mingw-ucrt lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.48-x86-mingw32 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.47 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.47-x64-mingw-ucrt lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.47-x64-mingw32 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.47-x86-mingw32 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.46 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.46-x64-mingw32 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.46-x64-mingw-ucrt lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.46-x86-mingw32 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.45 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.45-x64-mingw32 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.45-x64-mingw-ucrt lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.45-x86-mingw32 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.44 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.44-x64-mingw32 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.44-x86-mingw32 lib/fox16/exceptions_for_fxerror.rb
fxruby-1.6.43 lib/fox16/exceptions_for_fxerror.rb