From: Lyle Johnson Date: 2003-05-23T00:22:17+09:00 Subject: Re: FXRuby - FXMainWindow question John Reed wrote: > Is it true that you can't call message identifiers like methods? So, > for example, I can't create a method to force ID_CANCEL or ID_ACCEPT, > right? Message identifiers are just numbers (constants) and so you cannot call them like methods. Of course, Ruby makes it easy to add your own methods to FXRuby classes to do just that, e.g. # Reopen class to add new methods... class FXDialogBox def doAccept handle(nil, MKUINT(ID_ACCEPT, SEL_COMMAND), nil) end def doCancel handle(nil, MKUINT(ID_CANCEL, SEL_COMMAND), nil) end end Hope this helps, Lyle