Hi,

The following patch fixes the problem:

  RCS file: /home/cvs/embperl/Embperl/Syntax/EmbperlHTML.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- EmbperlHTML.pm    20 Jul 2004 04:59:11 -0000      1.8
  +++ EmbperlHTML.pm    4 Nov 2004 06:19:14 -0000       1.9
  @@ -71,7 +71,7 @@
                   perlcode =>
                       [ 
                       'Embperl::Cmd::InputCheck (%$n%, %&*\'name%,
%&*\'value%, %&\'checked%) ;  %&=-type:radio|checkbox% ',
  -                    '$idat{%&*\'name%}=$fdat{%&*\'name%} ; _ep_sa(%$n%,
\'value\', $fdat{%&*\'name%} || \'\') ;   %&!-value%',
  +                    '$idat{%&*\'name%}=$fdat{%&*\'name%} ; _ep_sa(%$n%,
\'value\', exists ($fdat{%&*\'name%})?$fdat{%&*\'name%}:\'\') ;
%&!-value%',
                       '$idat{%&*\'name%}=%&*\'value% ; ',
                       ]
                   }) ;

To make it more readable, change   
  
$fdat{%&*\'name%} || \'\'

To

exists ($fdat{%&*\'name%})?$fdat{%&*\'name%}:\'\'


Gerald



---------------------------------------------------------------------------
Gerald Richter            ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl

Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
E-Mail:     [EMAIL PROTECTED]          Voice:   +49 6133 939-122
WWW:        http://www.ecos.de/      Fax:     +49 6133 939-333
---------------------------------------------------------------------------
ECOS BB-5000 Firewall- und IT-Security Appliance: www.bb-5000.info
---------------------------------------------------------------------------
  

> -----Original Message-----
> From: Torsten Luettgert [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, November 03, 2004 3:44 PM
> To: [EMAIL PROTECTED]
> Cc: Luiz Fernando B. Ribeiro
> Subject: Re: Another "auto-fill from %fdat" problem
> 
> On Mi, 2004-11-03 at 16:35, Luiz Fernando B. Ribeiro wrote:
> > The %fdat hash is magical, since its a tied hash. I have 
> not tried but 
> > does it work if you use the following instead?
> > 
> > [- $fdat{'number'} = '0'); -]
> > <input type="text" name="number">
> 
> No, it doesn't work better this way (and yes, I omitted the 
> erroneos ")"
> from the code snippet :-)
> 
> Using "0 but true" works fine. Just 1, without '' around, 
> too. It really looks like the value is tested for truth, and 
> the field cleared unless it is true.
> 
> Greetings,
> Torsten <[EMAIL PROTECTED]>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to