def Root.new(keys=nil, &b)
unless TkCore::INTERP.tk_windows['.']
TkCore::INTERP.tk_windows['.'] =
super(:without_creating=>true, :widgetname=>'.'){}
end
root = TkCore::INTERP.tk_windows['.']
keys = _symbolkey2str(keys)
root.instance_eval{
__methodcall_optkeys.each{|key, method|
value = keys.delete(key.to_s)
self.__send__(method, value) if value
}
}
if keys
keys.each{|k,v|
if v.kind_of? Array
root.__send__(k,*v)
else
root.__send__(k,v)
end
}
end
if block_given?
if TkCore::WITH_RUBY_VM
root.instance_exec(root, &b)
else
root.instance_eval(&b)
end
end
root
end