[fxruby-users] Monitoring events/messages

Lyle Johnson
Mon, 19 Jan 2009 15:45:49 -0000

On Jan 18, 2009, at 1:20 PM, David MacMahon wrote:

> I am trying to learn FXRuby (and Fox).  I already know Ruby pretty
> well.  One thing that would help my understanding of FXRuby (and
> Fox) is to be able to monitor (i.e. spy) on events that are sent to
> a particular widget, class of widgets, or every widget.

You can try setting the target for a particular widget to an
FXDebugTarget instance. It should then print to the console all of the
messages that that widget receives, e.g.

	button = FXButton.new(...)
	debug_target = FXDebugTarget.new
	button.target = debug_target

Hope this helps,

Lyle