static public Method

KeywordConstructor.new(parent = :default_ctor, *mixed_args) { |self if block_given?| ... }

There's no documentation for this item.

Source Code

# File wx/keyword_ctors.rb, line 174
def initialize(parent = :default_ctor, *mixed_args)
  # allow zero-args ctor for use with XRC
  if parent == :default_ctor
    pre_wx_kwctor_init()
    return
  end

  real_args = [ parent ] + self.class.args_as_list(*mixed_args)
  begin
    pre_wx_kwctor_init(*real_args)
  rescue
    msg = "Error initializing #{self.inspect} \n" +
          "Sent parameters: #{real_args.inspect}\n" +
           "Correct parameters are:\n" + 
           self.class.describe_constructor()
    Kernel.raise ArgumentError, msg
  end

  yield self if block_given?
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.