From: Lyle Johnson Date: 2003-04-03T03:32:19+09:00 Subject: Re: FXRuby 1.0.21 FXOptionMenu problem James Adam wrote: > Basically, whenever I use an FXOptionMenu, or specifically an FXOption > to which i then ".connect(SEL_COMMAND)" some code to, changing to that > option when the app is running results in the following error being > printed out on the commandline: > > FXRuby.cpp(667): FXASSERT(FALSE) failed. This is a bug. If you want to locally patch your code, add the following snippet in FXRbConvertMessageData(): else if(sender->isMemberOf(FXMETACLASS(FXOption))){ if(type==SEL_COMMAND) return to_ruby(reinterpret_cast(ptr)); } Based on the fact that you've already been looking at that function, I think you'll see where to add it. This will be fixed for FXRuby-1.0.22. > [nb. as an aside, it seems to trigger segfaults within random OpenGL > calls, usually resulting in [BUG] rb_gc_mark() errors. this might just > be my code, but then i 'neuter' the FXOptionMenu the problem > disappears] Yes. If we don't recognize the sender & message type for the message (e.g. a SEL_COMMAND message from an FXOption instance) we just pass through the message data as-is, assuming it's a valid Ruby object. This was done in the event that you create your own widgets with special message data. Since in this case the message data is not a Ruby object (but rather a pointer to a C++ FXEvent object) you'll eventually get a runtime error of some sort.