Professional Web Applications Themes

Closing FXDialogBox without user input? - Ruby

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...

  1. #1

    Default Closing FXDialogBox without user input?

    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 Guest

  2. #2

    Default Re: Closing FXDialogBox without user input?

    Steve Kozma wrote: 

    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 Guest

  3. #3

    Default 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" <Berkeley.EDU>
    To: "ruby-talk ML" <org>
    Sent: Sunday, February 15, 2004 10:17 PM
    Subject: Re: Closing FXDialogBox without user input?

     
    >
    > 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.
    >[/ref]


    Steve Guest

  4. #4

    Default Re: Closing FXDialogBox without user input? - Thanks!

    Steve Kozma wrote: 

    You're welcome!
     

    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 Guest

  5. #5

    Default "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 Guest

Similar Threads

  1. Closing connection of one user..
    By Unknowner in forum Macromedia Flash Flashcom
    Replies: 1
    Last Post: July 14th, 05:32 PM
  2. Remembering User input
    By Lamptey in forum Macromedia Director Basics
    Replies: 2
    Last Post: May 9th, 11:59 AM
  3. Getting User Input via Email
    By Tim M in forum ASP
    Replies: 2
    Last Post: September 25th, 05:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139