cvsuser     02/02/22 14:30:45

  Modified:    P5EEx/Blue/P5EEx/Blue Context.pm
  Log:
  fixed a bug which cause widgets not to initialize if a value had been posted to them 
prior to requesting them via the widget() method
  
  Revision  Changes    Path
  1.16      +8 -4      p5ee/P5EEx/Blue/P5EEx/Blue/Context.pm
  
  Index: Context.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/P5EEx/Blue/P5EEx/Blue/Context.pm,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -w -r1.15 -r1.16
  --- Context.pm        18 Feb 2002 19:01:21 -0000      1.15
  +++ Context.pm        22 Feb 2002 22:30:45 -0000      1.16
  @@ -1,6 +1,6 @@
   
   #############################################################################
  -## $Id: Context.pm,v 1.15 2002/02/18 19:01:21 spadkins Exp $
  +## $Id: Context.pm,v 1.16 2002/02/22 22:30:45 spadkins Exp $
   #############################################################################
   
   package P5EEx::Blue::Context;
  @@ -391,8 +391,8 @@
   
       $new_service = 0;
   
  -    if (!defined $service) {
  -        $service = {};               # start with a new simple hash reference
  +    if (!defined $service || ref($service) eq "HASH") {
  +        $service = {} if (!defined $service);  # start with new hash ref
           $service->{name} = $name;
           $service->{context} = $self;
   
  @@ -409,7 +409,11 @@
           # start with runtime state for the widget from the session
           ################################################################
           if ($service_state) {
  -            %$service = %$service_state;
  +            foreach $attrib (keys %$service_state) {
  +                if (!defined $service->{$attrib}) {
  +                    $service->{$attrib} = $service_state->{$attrib};
  +                }
  +            }
           }
   
           ################################################################
  
  
  


Reply via email to