Forget it !!
Forget it !!

Using Messagebox instead of using a own module I resolve this stupid problem.

But, I have to say, a new tutorial or documentation with some examples will be 
excellent, or just a list of interesting links about Win32::GUI.

I guess anybody has lost time in trying to answer me. Excuses.

Guillem Cunillera i Wefers.
  -----Mensaje original-----
  De: Guillem Cunillera Wefers <[EMAIL PROTECTED]>
  Para: perl-win32-gui-users@lists.sourceforge.net 
<perl-win32-gui-users@lists.sourceforge.net>
  Fecha: dijous, 28 / febrer / 2002 12:25
  Asunto: [perl-win32-gui-users] Waiting the user to continue the download of 
information from the web


  Hello again,

  In my aplication I have to acces  a lot of times to a web information, but I 
don't want to die my apllication if a non is_succes and I want to put a message 
error and waiting the answer of the user if he wants to insist or abort. I 
don't know if maybe yesterday I drunk too much but today I have no idea.
  Can anybody help me ?
  I include for you the code of one of them that don't go correctly for this 
reason, i have to use semaphores or something like this ?
  This subroutine is not inside a module that uses any window.

   # -------------------------------------
  sub obtenirget {
  # -------------------------------------
  # permet obtenir la informacio de la direcció web subministrada

   my $llistotal=shift(@_);

   $finalitzat=0;
   $intents=0;
   while ($finalitzat==0)
   {
    my $ua = LWP::UserAgent->new;
    my $req = HTTP::Request->new(GET => $llistotal);
    my $res = $ua->request($req);

    if ($res->is_success)
    {
     $contingut = $res->content; 
     $contingut =~ s/\015?\012/\n/g; ##per als salts de HTML
     $contingut =~ s/\015\012?/\n/g; ## per a DOS  
     $finalitzat=1;
    } else 
    {
     $intents++;
     if ($intents % 5)
     {
      $texterror="Error No s ha obtingut la llista satisfactoriament 
".$res->status_line;
         Mailtool::errors::visualitza($texterror);
     }
    }
    
   }
   
   return($contingut);
  }

Reply via email to