HELP: Problem w/Tk, Dialog Boxes 
Author Message
 HELP: Problem w/Tk, Dialog Boxes

Environment:  AIX v4.1.{4,5}
Perl: 5.004
Tk:  400.202

I'm attempting to develop a perl/tk script to automate a process here
and one of the things I want to do is to have a call to edit a specific
file fire as the result of a button click.  That works well enough, but
I'd also like to pop a dialog box containing editing instructions just
prior to the editor window popping, as shown in the code segment below.
Of interest, the commented code successfully calls gvim; however, if I
uncomment the lines defining and calling the Dialog, the dialog pops but
my entire X-session freezes solid (on screen clock stops, can't mouse
between any of multiple windows, change focus, etc.).  Same happens if I
replace the call to gvim with something like 'xterm -e vi'.  If I go to
another terminal while my own session is frozen, I can see that gvim has
been called, but ....  I've tried this both as shown, with back-tics,
and as a system() call  with identical behavior

I'd like to think this is a problem with perl/tk, but I'm just as
willing to believe there's a fundamental error I've committed here but
can't see because I'm too close to the problem.  If anybody would care
to take a look at this and give me the benefit of his/her thoughts, I'd
be grateful.  I have RTFM, the FAQ, etc., but find no joy.

  Bob Melson

<----- SNIP ----->
# the "calling" button
$cont = $f->Button(
        -font           => $font,
        -text           => 'EDIT Contents File',
        -command        => [\&edit_contents],
        -relief         => 'raised',
$gvim = "/usr/local/bin/gvim -n";

sub edit_contents
#       my $info = "Edit Contents File";
#       $d = $w->Dialog(
#               -title          => 'Edit Contents File',
#               -text           => $info,
#               -bitmap         => 'info',
#               -default_botton => 'CONTINUE',
#               -buttons        => ['CONTINUE','RETURN'],
#       );
#       my $b = $d->Show();
#       if( $b eq 'CONTINUE' )
#       {
        chdir "/ptfadmin/sandboxes/$ptf";
        `$gvim  contents`;
#       }


<----- SNIP ----->
Bob Melson                        The right to be heard does not include
Motorola Computer Group             the right to be taken seriously
2900 S. Diablo Way, Tempe, AZ     Hubert Humphrey  

Tue, 08 Feb 2000 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. binding Escape to Cancel in Tk::Dialog(Box)

2. Problem with Dialog Boxes

3. Poup and Dialog boxes - Re: Weird problem with waitVariable on

4. Poup and Dialog boxes - Re: Weird problem with waitVariable on Tk800.015

5. Problem with dialog boxes on multiheaded display

6. Help: Dialog box in web browser

7. Standard dialog boxes-help

8. Dialog without Tk::Dialog

9. Creating dialog boxes with tkperl

10. Dialog box module for Win32?

11. Changing the filename in the download dialog box

12. Win32 & OLE Dialog box in Word


Powered by phpBB® Forum Software