MacArthur, Ian (SELEX GALILEO, UK) wrote: >> The fact that it "worked" in your 2nd example appears just to be >> good luck or something like this... ;-) > > I didn't check, but the OP said the case that worked derived from > Fl_Button, so I assume that works because the "Fl_Widget*" and the > "this*" both hark back to Fl_Button in that case. Somehow...
Indeed, it looks so, but ... he's using an Fl_Button* and calls a virtual method of class A with this. That means that - of course dependent on the particular implementation - the generated code would use a virtual function table of an Fl_Button and interpret it as one of class A (or B) and call the virtual method cb_i "relative to" this vtable. I can't imagine how this could work and call the right method. But, since this is implementation dependent, who knows what happened in this case. I won't investigate... ;-) Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

