Closing FXDialogBox without user input?

Discussion in 'Ruby' started by Steve Kozma, Feb 14, 2004.

  1. Steve Kozma

    Steve Kozma Guest

    Hi!

    I would like to display a DialogBox as long as an external command is
    running
    and then remove it without any user interaction.
    I thought something like this might work, but it doesn't:

    @infoWin.handle(nil, MKUINT(FXDialogBox::ID_CANCEL, SEL_UPDATE), nil)

    Thanks in advance for any suggestions!

    Best regards,
    Steve
    Steve Kozma, Feb 14, 2004
    #1
    1. Advertising

  2. Steve Kozma wrote:
    > Hi!
    >
    > I would like to display a DialogBox as long as an external command is
    > running
    > and then remove it without any user interaction.
    > I thought something like this might work, but it doesn't:
    >
    > @infoWin.handle(nil, MKUINT(FXDialogBox::ID_CANCEL, SEL_UPDATE), nil)


    It might be simpler than that. In examples/dialog.rb, change one method
    as follows:

    # Show the non-modal dialog
    def onCmdShowDialog(sender, sel, ptr)
    @dialog.show
    Thread.new {
    sleep 2
    @dialog.hide
    }
    end

    The dialog stays open for 2 sec, allowing user interaction, and then
    goes away.
    Joel VanderWerf, Feb 15, 2004
    #2
    1. Advertising

  3. Steve Kozma

    Steve Kozma Guest

    Re: Closing FXDialogBox without user input? - Thanks!

    Thank You! It is exactly what I wished for. =o))

    This is a great Group, just as great as Ruby!

    Best Regards,
    Steve

    ----- Original Message -----
    From: "Joel VanderWerf" <>
    To: "ruby-talk ML" <>
    Sent: Sunday, February 15, 2004 10:17 PM
    Subject: Re: Closing FXDialogBox without user input?


    > Steve Kozma wrote:
    > > Hi!
    > >
    > > I would like to display a DialogBox as long as an external command is
    > > running
    > > and then remove it without any user interaction.
    > > I thought something like this might work, but it doesn't:
    > >
    > > @infoWin.handle(nil, MKUINT(FXDialogBox::ID_CANCEL, SEL_UPDATE), nil)

    >
    > It might be simpler than that. In examples/dialog.rb, change one method
    > as follows:
    >
    > # Show the non-modal dialog
    > def onCmdShowDialog(sender, sel, ptr)
    > @dialog.show
    > Thread.new {
    > sleep 2
    > @dialog.hide
    > }
    > end
    >
    > The dialog stays open for 2 sec, allowing user interaction, and then
    > goes away.
    >
    Steve Kozma, Feb 15, 2004
    #3
  4. Re: Closing FXDialogBox without user input? - Thanks!

    Steve Kozma wrote:
    > Thank You! It is exactly what I wished for. =o))


    You're welcome!

    > This is a great Group, just as great as Ruby!


    There is also Lyle's FXRuby mailing list, which you can join at:

    http://fxruby.sourceforge.net/

    It's low volume, but there seem to be about 15-20 people who contribute
    from time to time.
    Joel VanderWerf, Feb 15, 2004
    #4
  5. Steve Kozma

    Steve Kozma Guest

    "General Protection Fault " after third run of an external program

    Hi!

    I invoke an external command the following way:

    ...
    execThis = "c:/WINNT/tar_dos.exe -cf " + $tarFileName + " " + $nameList
    win_system(execThis)
    ...

    I defined win_system the way I saw it on the list:

    def win_system(command)
    Win32API.new("crtdll","system",['P'],'L').Call(command)
    end

    Now, when I start my program (on Win2000) it works fine.
    Starting again is most of the time OK too.
    But mostly on the third time I get this error (copied from irb shell):

    Exiting due to signal SIGSEGV
    General Protection Fault at eip=0001607f
    eax=ffa30040 ebx=0000003f ecx=000001dc edx=ffa30000 esi=00000040
    edi=00000003
    ebp=0006e5b0 esp=0006e5a0 program=
    cs: sel=01a7 base=01dc0000 limit=7e22ffff
    ds: sel=01af base=01dc0000 limit=7e22ffff
    es: sel=01af base=01dc0000 limit=7e22ffff
    fs: sel=017f base=00006e10 limit=0000ffff
    gs: sel=01bf base=00000000 limit=7ffeffff
    ss: sel=01af base=01dc0000 limit=7e22ffff

    Call frame traceback EIPs:
    0x0001607f
    0x00016005
    0x0001481a
    0x000148d1
    => 0

    After such an error I have to close the DOS Shell where I was started the
    program
    with irb, and open a new one to get it work again.

    Any idea why this happens?

    Best regards,
    Steve
    Steve Kozma, Feb 16, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Vk1J?=

    Closing popup window when closing parent window?

    =?Utf-8?B?Vk1J?=, Feb 14, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    641
    Thomas Hansen
    Feb 15, 2007
  2. Replies:
    4
    Views:
    652
    Walter Roberson
    Sep 9, 2005
  3. Nigel Wilkinson

    Elementary FXDialogBox query

    Nigel Wilkinson, Jun 5, 2004, in forum: Ruby
    Replies:
    5
    Views:
    169
    Nigel Wilkinson
    Jun 7, 2004
  4. Raj Sahae

    help with FXDialogBox

    Raj Sahae, Mar 3, 2007, in forum: Ruby
    Replies:
    4
    Views:
    77
    Raj Sahae
    Mar 3, 2007
  5. thomas
    Replies:
    0
    Views:
    214
    thomas
    Oct 23, 2003
Loading...

Share This Page