Problem with Perl TK
- From: "MyNeWs" <news@xxxxxxxxxx>
- Date: Sat, 22 Jul 2006 00:16:42 +0200
Good evening, I have a problem which I do not manage to solve. Thank you
with those which have a solution or an idea. I have a script Perl, in Tk
which enables me to carry out research with Yahoo. When the program runs in
..pl, there is no problem, the connection is done and the data return. When
I converted it into .exe (Perl2Exe V8.80) I have an error message and I do
not have any result in return. Here an end of script. sub yahoo
{
#Variables Yahoo
################
my $my_search;
my @Results;
my $Result;
my $win_yahoo = MainWindow->new();
$win_yahoo->title("Search Yahoo");
$win_yahoo->maxsize (qw(300 100));
$win_yahoo->minsize (qw(300 100));
my
$menu_yahoo=$win_yahoo->Frame(-relief=>'raised',-borderwidth=>2)->pack(-fill=>'x');
my
$menuyahoo=$menu_yahoo->Menubutton(-foreground=>'blue',-text=>'Menu',-tearoff=>0,-menuitems=>[
['command'=>'Exit' ,-command=>sub {$win_yahoo -> DESTROY ();}]]);
my $cadre_yahoo = $win_yahoo->Frame->pack(-side=>'top');
my $cadre_yahoo2 = $win_yahoo->Frame->pack(-side=>'top');
$cadre_yahoo2->Label(-text=>'Search with Yahoo :
',-foreground=>'blue',-justify=>'right')->pack(-side=>
'left',-anchor=>'w',-expand => 1);
$cadre_yahoo2->Entry(-textvariable=>
\$my_search,-justify=>'left',-width=>'15')->pack(-side=>
'left',-anchor=>'w',-expand => 1);
my $nett=$win_yahoo->Photo(-file=> 'C:\\YAHOO\\IMAGES\\erase.bmp');
my $netto = $win_yahoo -> Button(-relief=>"flat",-image=>$nett,-command =>
sub {$my_search="";});
$netto->pack(-side => 'left' , -expand => 1);
my $val=$win_yahoo->Photo(-file=> 'C:\\YAHOO\\IMAGES\\valide.bmp');
my $valide_yahoo = $win_yahoo -> Button(
-relief=>"flat",
-image=>$val,
-command => sub {
my $resu="C:\\YAHOO\\RESULTATS\\Yahoo-$my_search.txt";
unlink $resu;
@Results = Yahoo::Search->Results(Doc => "$my_search",
AppId => "$argument",
# The following args are optional.
# (Values shown are package
defaults).
Mode => 'any', # all
words
Start => 0,
Count => 100,
Type => 'any', # all types
AllowAdult => 0, # no porn,
please
AllowSimilar => 0, # no dups,
please
Language => undef,
);
for $Result (@Results)
{
open (FIC,">>$resu") or die "I cannot find $resu";
printf FIC $Result->Title;
printf FIC "\n";
printf FIC $Result->ClickUrl;
printf FIC "\n\n";
close (FIC);
}
});
$valide_yahoo->pack(-side => 'right' , -expand => 1);
$menuyahoo->pack(-side=>'left');
}
The error message that I have in return (dice that I validate my research):
Tk::Error: panic: swash_fetch at PERL2EXE_STORAGE/URI.pm line 92.
Tk callback for .button1
Tk::__ANON__ at PERL2EXE_STORAGE/Tk.pm line 252
Tk::Button::butUp at PERL2EXE_STORAGE/Tk/Button.pm line 111
<ButtonRelease-1>
(command bound to event)
I have to add these packages in my script, but without large changes. use
URI;
use Tk::Text;
use Tk::Scrollbar;
use Tk::Button;
If I add that :
require Tk::ErrorDialog;
I have this in answer:
Background Error: window ".errordialog.dialog" was deleted before its
visibility changed at PERL2EXE
_STORAGE/Tk/Widget.pm line 926.
Veiled, if somebody with an idea because I pedal. Thank you --
"Me, Adam and Eve, I believe in it more you see, because I am not an idiot:
the apple, that cannot be bad, it is full of pectin."
JC Vandamme
--
"Moi, Adam et Ève, j'y crois plus tu vois, parce que je suis pas un idiot :
la pomme, ça peut pas être mauvais, c'est plein de pectine..." JC Vandamme
.
- Follow-Ups:
- Re: Problem with Perl TK
- From: bdz
- Re: Problem with Perl TK
- Prev by Date: Re: OT - the empty set and strict and warnings
- Next by Date: listbox underlining
- Previous by thread: Tk::send & Tk::Receive - without Tk?
- Next by thread: Re: Problem with Perl TK
- Index(es):