|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
FXDialogBox and SEL_CLOSE messageHello,
I want to catch the message SEL_CLOSE from a FXDialogBox running in non modal mode. This is my code: class FXTestDialog < FXDialogBox def initialize(owner) super(owner, "Test of Dialog Box", DECOR_ALL) self.connect(SEL_CLOSE) do |sender, sel, event| p 'I am closing' end end end When I close the dialogbox I don't see the string 'I am closing', because the SEL_CLOSE block is not called. It is something missed here? I am using FxRuby ver 1.6.12 under Linux. ------------ Barabba ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ Foxgui-users mailing list Foxgui-users@... https://lists.sourceforge.net/lists/listinfo/foxgui-users |
|
|
Re: FXDialogBox and SEL_CLOSE messageI have looked into the C++ source code and seam that FXDialogBox handle SEL_CLOSE to raise Cancel message.
I don't know if it possible to implement FXTopWindow in ruby, but to handle the SEL_CLOSE message into a new window is better to inherit from FXMainWindow using the FXApp instance as window owner. The FxRuby book suggest to use FXDialogBox as base class for a new window but it was confusing me.
|
|
|
Re: FXDialogBox and SEL_CLOSE messageOn Tuesday 13 October 2009, Barabba wrote:
> > I have looked into the C++ source code and seam that FXDialogBox handle > SEL_CLOSE to raise Cancel message. Yes. This simply hides the window and terminates the modal loop for the FXDialogBox. On FXMainWindow, a SEL_CLOSE actually deletes the window, and, if it was the last window of the application, may also terminate the application. > I don't know if it possible to implement FXTopWindow in ruby, but to handle > the SEL_CLOSE message into a new window is better to inherit from > FXMainWindow using the FXApp instance as window owner. > > The FxRuby book suggest to use FXDialogBox as base class for a new window > but it was confusing me. You can do it either way, depending on whether your window is to be a self- contained "main" window, or a subwindow displayed from another window (e.g. like the file dialog). For the former you'd use FXMainWindow, and for the latter FXDialogBox. - Jeroen ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Foxgui-users mailing list Foxgui-users@... https://lists.sourceforge.net/lists/listinfo/foxgui-users |
| Free embeddable forum powered by Nabble | Forum Help |