Undefined method 'flush' for Fox::FXApp?

Hi!

I’m new to Ruby and OO programming, so please forgive my silly question.
Im trying to call FXApp::flush() from one of my methods wich is called when
a button is pressed. I get an "Undefined method ‘flush’ for Fox::FXApp"
error.
When I print all public_instance_methods for FXApp, I can see flush listed,
so
I don’t really understand why it doesn’t work.
I spent the last day with reading all the documentations regarding
inheritance
but I’m unable to figure out how to call it correctly… :o((
(Lyle thank you for your suggestion regarding the Changing Button Icon
problem.)

Best Regards,
Steve

Steve Kozma wrote:

I’m new to Ruby and OO programming, so please forgive my silly question.
Im trying to call FXApp::flush() from one of my methods wich is called when
a button is pressed. I get an “Undefined method ‘flush’ for Fox::FXApp”
error.

I just tried it here (as a sanity check :wink: and the method’s definitely
there. It’s just a plain old instance method for the FXApp class, so you
should be able to do something like:

 getApp().flush

If you can’t find the error, please send me a copy of your program
privately (or post the code here, if it’s short).

– Lyle