[fxruby-users] Re: [Foxgui-users][fxruby] FXDialogBox.new(self, "test").show won't work

lyle at knology.net lyle at knology.net
Wed Apr 27 16:38:39 EDT 2005

On Wed, 27 Apr 2005 22:10:56 +0200, "Daniel W." <dawh at gmx.net> wrote :

> I have just a simple class which is derived from FXMainWindow.
> If I do a
>  FXDialogBox.new(self, "test").show
> in the create function it works (in create I do a super, show, and the 
> FXDialog...)


> I have one test menu with one menu command which posts a message to self.


> and if I do the
>  FXDialogBox.new(self, "test").show
> in the function onMsgCreateTemplate it does nothing. No error and now 
> dialog.

Just to be clear: are you calling create() on the dialog box after you
construct it in your onMsgCreateTemplate() method? If not, that's the
problem. Your onMsgCreateTemplate() method should look something like this,
I think:

    def onMsgCreateTemplate(sender, sel, ptr)
      dialog = FXDialogBox.new(self, "test")
      return 1

Hope this helps,


More information about the fxruby-users mailing list