ext/wxGauge.cpp in rwx-0.0.1.dev vs ext/wxGauge.cpp in rwx-0.0.1.1.dev

- old
+ new

@@ -69,13 +69,15 @@ set_hash_option(hash,"style",style); set_hash_flag_option(hash,"vertical",wxGA_VERTICAL,style); set_hash_flag_option(hash,"smooth",wxGA_SMOOTH,style); } + if(nil_check(parent)) + _self->Create(unwrap<wxWindow*>(parent),id, + range,wxDefaultPosition,wxDefaultSize,style + ); - _self->Create(unwrap<wxWindow*>(parent),id,range,wxDefaultPosition,wxDefaultSize,style); - } rb_call_super(argc,argv); if(rb_obj_is_kind_of(hash,rb_cHash)) @@ -135,18 +137,20 @@ #if 0 rb_mWX = rb_define_module("WX"); rb_cWXWindow = rb_define_class_under(rb_mWX,"Window",rb_cObject); rb_cWXControl = rb_define_class_under(rb_mWX,"Control",rb_cWXWindow); - - rb_define_attr(rb_cWXGauge,"range",1,1); - rb_define_attr(rb_cWXGauge,"value",1,1); #endif #if wxUSE_GAUGE using namespace RubyWX::Gauge; rb_cWXGauge = rb_define_class_under(rb_mWX,"Gauge",rb_cWXControl); rb_define_alloc_func(rb_cWXGauge,_alloc); + +#if 0 + rb_define_attr(rb_cWXGauge,"range",1,1); + rb_define_attr(rb_cWXGauge,"value",1,1); +#endif rb_define_method(rb_cWXGauge,"initialize",RUBY_METHOD_FUNC(_initialize),-1); rb_define_attr_method(rb_cWXGauge,"range",_getRange,_setRange); rb_define_attr_method(rb_cWXGauge,"value",_GetValue,_setValue);