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

- old
+ new

@@ -73,11 +73,15 @@ set_hash_option(hash,"style",style); set_style_flags(hash,style); } - _self->Create(unwrap<wxWindow*>(parent),id,value,wxDefaultPosition,wxDefaultSize,style); + if(nil_check(parent)) { + _self->Create(unwrap<wxWindow*>(parent),id,value, + wxDefaultPosition,wxDefaultSize,style + ); + } } rb_call_super(argc,argv); if(rb_obj_is_kind_of(name,rb_cString) && @@ -139,17 +143,19 @@ rb_cWXControl = rb_define_class_under(rb_mWX,"Control",rb_cWXWindow); rb_mWXTextArea = rb_define_module_under(rb_mWX,"TextArea"); rb_mWXTextEntry = rb_define_module_under(rb_mWX,"TextEntry"); - - rb_define_attr(rb_cWXTextCtrl,"value",1,1); #endif #if wxUSE_TEXTCTRL using namespace RubyWX::TextCtrl; rb_cWXTextCtrl = rb_define_class_under(rb_mWX,"TextCtrl",rb_cWXControl); rb_define_alloc_func(rb_cWXTextCtrl,_alloc); + +#if 0 + rb_define_attr(rb_cWXTextCtrl,"value",1,1); +#endif rb_include_module(rb_cWXTextCtrl,rb_mWXTextArea); rb_include_module(rb_cWXTextCtrl,rb_mWXTextEntry); rb_define_method(rb_cWXTextCtrl,"initialize",RUBY_METHOD_FUNC(_initialize),-1);