Home > Archive > PerlTk > March 2005 > Problem with getSaveFile / getOpenFile
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Problem with getSaveFile / getOpenFile
|
|
| Christoph Fuchs 2005-03-01, 3:58 pm |
| I have a problem using getSaveFile and getOpenFile with Tk 804.027 / perl
5.8.2 on Solaris 9:
The first time this routine is called, it works fine.
However, if it is called again, the file selector window opens, but does not
respond to any button (Save or Open an Cancel), and it cannot be killed by
with using the window manager.
The main window still responds to events.
Any suggestions ?
Christoph
--
DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen!
AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@lists.stanford.edu
| |
| Marc Dashevsky 2005-03-02, 3:57 am |
| At 08:17 AM 3/1/2005, Christoph Fuchs wrote:
>I have a problem using getSaveFile and getOpenFile with Tk 804.027 / perl
>5.8.2 on Solaris 9:
>
>The first time this routine is called, it works fine.
>However, if it is called again, the file selector window opens, but does not
>respond to any button (Save or Open an Cancel), and it cannot be killed by
>with using the window manager.
>The main window still responds to events.
Would you show us a small program that demonstrates the problem?
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@lists.stanford.edu
| |
| Christoph Fuchs 2005-03-02, 8:56 am |
| This is a MIME encapsulated multipart message -
please use a MIME-compliant e-mail program to open it.
Dies ist eine mehrteilige Nachricht im MIME-Format -
bitte verwenden Sie zum Lesen ein MIME-konformes Mailprogramm.
--========GMXBoundary229831109750952
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
> At 08:17 AM 3/1/2005, Christoph Fuchs wrote:
> not
> by
>
> Would you show us a small program that demonstrates the problem?
Attached is a program. Click on "getSaveFile", choose a filename and "Save"
(nothing will be saved, just the filename is printed), and repeat this
action. What happens this time ?
However, I found that I could not reproduce this error on Solaris 8 (with
identical perl and TK installaitions otherwise). So I assume I have to look
locally for the problem. Nevertheless, if anyone can give me hint, it would
be helpful.
Christoph
--
DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen!
AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl
--========GMXBoundary229831109750952
Content-Type: application/octet-stream; name="test_getSaveFile.pl"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test_getSaveFile.pl"
IyEgL3Vzci9sb2NhbC9iaW4vcGVybCAtdwp1c2Ug
c3RyaWN0OwoKdXNlIFRrOwoKbXkgJG13ID0g
bmV3IE1haW5XaW5kb3c7CgokbXctPkJ1dHRvbigt
dGV4dD0+J2dldFNhdmVGaWxlJywKCSAgICAt
Y29tbWFuZD0+XCZjYWxsR2V0U2F2ZUZpbGUpCiAg
IC0+cGFjazsKCiRtdy0+QnV0dG9uKC10ZXh0
PT4nUXVpdCcsIC1jb21tYW5kPT5cJmV4aXQpCiAg
IC0+cGFjazsKCnN1YiBjYWxsR2V0U2F2ZUZp
bGUgewoKICAgIG15ICRmaWxlbmFtZSA9ICRtdy0+
Z2V0U2F2ZUZpbGU7CiAgICBwcmludCBTVERF
UlIgIkdvdDogJGZpbGVuYW1lXG4iOwp9CgpNYWlu
TG9vcDsKCgo=
--========GMXBoundary229831109750952--
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@lists.stanford.edu
| |
| D. Marxsen 2005-03-02, 4:02 pm |
| Hello!
"Christoph Fuchs" <J.C.Fuchs@gmx.de> schrieb im Newsbeitrag
news:d01tkn$vq6$1@rain.CC.Lehigh.EDU...
> I have a problem using getSaveFile and getOpenFile with Tk 804.027 / perl
> 5.8.2 on Solaris 9:
>
> The first time this routine is called, it works fine.
> However, if it is called again, the file selector window opens, but does
not
> respond to any button (Save or Open an Cancel), and it cannot be killed by
> with using the window manager.
I encountered strange behaviour of windows after using these routines too.
My workaround follows:
--- CUT start ---
sub selectsrc # Select source file
{
my $wi_query; # Ref to query window
my @types; # List of file types to list
$wi_query=$wi_main->Toplevel(); # We have to create a temporary window
as the normal one blocks after file selection
$wi_query->maxsize(400,1);
$wi_query->minsize(400,1);
$wi_query->title("Quelldatei wählen");
@types =
(["PostScript files", 'ps']
);
$srcfname=$wi_query->getOpenFile(-filetypes => \@types);
$srcfname=~s/\//\\/g;
$wi_query->destroy();
if($srcfname ne '')
{
&do_something;
}
}
--- CUT end ---
Hope this helps!
Cheers,
Detlef.
--
D. Marxsen, TD&DS GmbH
detlef.marxsen@tdds-gmbz.de (replace z with h, spam protection)
|
|
|
|
|