On May 14, 2009, at 11:04 AM, Melton, Ryan wrote:
Lyle if you could release a new version of FXRuby with this fix, I would really appreciate it.
Here is the summary so people don’t have to follow the link:
<snip>
Add this method to FXRbApp.cpp:
FXWindow *FXApp::getFocusWindow() const { FXWindow *result=getActiveWindow();
VALUE value=FXRbGetRubyObj(result,true);
if(!NIL_P(value)){ if(result){ while(result->getFocus()){ result=result->getFocus();
}
}
return result;
}
return NULL;
}
Was your intent here to replace the version of FXApp::getFocusWindow() that is compiled into the FOX library? Because as it's written you're just going to get duplicate symbols error at link time.
The getFocusWindow() isn't declared as a virtual function in the FXApp class, so we can't override it in the FXRbApp subclass. If the only concern is that the call to FXApp::getFocusWindow() can crash during the GC phase, however, I can probably just apply this patch as a special case in the FXRbApp::markfunc (in markfuncs.cpp). I'll try that and see if it does the trick.
_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users