> Whipped up my first FOX dealy ... and it don't work. It creates the form, > creates the button, but the button click event is not hooked up to my > method. I tried to model it after the examples in the Windows dist, but .... > can anyone see what I'm doing wrong? Yes, I can see what you're doing wrong ;) When you create the button, the fourth and fifth arguments to FXButton.new() specify the message target and message identifier, respectively, for that button. In other words, which object should this button instance send its messages to, and how should it identify itself when sending those messages? In your case, you're saying that the application instance (app) should be the target for all messages generated by the button and the message ID should be TestWindow.ID_CREATE_JOB: FXButton.new(self, "Create Test Job", nil, app, ID_CREATE_JOB) Well, the problem is that your application object ("app", which is an instance of class FXApp) isn't expecting this FXWindow.ID_CREATE_JOB message and will presumably ignore it. Or worse, it may mistake it for some other message and do something unexpected. Either way, that's the source of the problem. If we look at the rest of your program it becomes clearer that you really wanted your main window (which is an instance of class TestWindow) to handle that message from the button. So I think that if you just change the line where you make the button to look like so: FXButton.new(self, "Create Test Job", nil, self, ID_CREATE_JOB) that you'll get the desired result: the button will now send a message with message ID "ID_CREATE_JOB" to the main window instance. And since you've told your main window to expect it: FXMAPFUNC(SEL_COMMAND, ID_CREATE_JOB, "onCreateJob") it should jump down into TestWindow#onCreateJob when the button is clicked. But as of a few releases of FXRuby ago, there's a much easier way to do this ;) After the FXRuby presentation at RubyConf last October it became clear that the highest priority needed to be simplifying all of this message-target stuff. So a Wiki page (http://www.rubygarden.org/ruby?FXRubyComments) was set up to hash out the details and the new system was introduced with FXRuby-0.99.180. The new system is covered in the FXRuby user's guide, but the short version is that you can now attach Ruby procedures (code blocks) directly to widgets without setting up message maps with FXMAPFUNC and all that garbage. The "old way" still works, but the "new way" is a lot better for most applications. In your case, the new and improved version would look something like this: ##################################################################### require 'camelot.acceptance.tests' require 'fox' include Fox class TestWindow < FXMainWindow include JobBoardRemote def initialize(app) super(app, "Camelot Test Utility", nil, nil, DECOR_ALL, 0, 0, 100, 100) FXButton.new(self, "Create Test Job").connect(SEL_COMMAND) { setTestValues begin createTestJob ensure @iec.close end } end def create super show(PLACEMENT_SCREEN) end end def run application = FXApp.new("Camelot Test Utility", "Snelling") application.init(ARGV) TestWindow.new(application) application.create application.run end run ###################################################### The important differences are: * no longer need to require 'fox/responder' * no longer need to include Responder * no longer need to create message identifiers * no longer need to specify message maps using FXMAPFUNC * not usually necessary to have message-handling code in a separate method (although it's still sometimes desirable). Hope this helps, Lyle