/[papo]/papo/neb/neb/Tree/Container.pm
ViewVC logotype

Diff of /papo/neb/neb/Tree/Container.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by jlenton, Mon Apr 7 18:02:43 2003 UTC revision 1.2 by jlenton, Wed Apr 9 15:29:14 2003 UTC
# Line 17  sub add_content Line 17  sub add_content
17    
18      push @{$self->{CONTENT}}, $content;      push @{$self->{CONTENT}}, $content;
19      $content->parent($self);      $content->parent($self);
     $content->index($#{$self->{CONTENT}});  
20    
21      return @{$self->{CONTENT}};      return @{$self->{CONTENT}};
22  }  }
# Line 27  sub remove Line 26  sub remove
26      my $self = shift;      my $self = shift;
27      my $kid = shift;      my $kid = shift;
28    
29      splice @{$self->{CONTENT}}, $kid->index, 1;      my $content = $self->content;
30    
31        foreach (0..$#{$content})
32        {
33            if ($content->[$_] eq $kid)
34            {
35                splice (@$content, $_, 1);
36                last;
37            }
38        }
39    
40  }  }
41    
42  sub content  sub content

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26