Mercurial > pub > Impl
comparison Lib/IMPL/Object/List.pm @ 151:e36ffd8c29db
Fixed major bug in conversion from a POST request to the DOM document (when instanceId == 0)
minor fixes
author | wizard |
---|---|
date | Fri, 20 Aug 2010 16:33:37 +0400 |
parents | 76b878ad6596 |
children | 6ce1f052b90a |
comparison
equal
deleted
inserted
replaced
150:4369d5458bb6 | 151:e36ffd8c29db |
---|---|
66 @$this = grep $_ ne $item, @$this; | 66 @$this = grep $_ ne $item, @$this; |
67 | 67 |
68 return $this; | 68 return $this; |
69 } | 69 } |
70 | 70 |
71 sub FindItem { | |
72 my ($this,$item) = @_; | |
73 | |
74 for (my $i = 0; $i < @$this; $i++ ) { | |
75 return $i if $this->[$i] == $item | |
76 } | |
77 return undef; | |
78 } | |
79 | |
80 sub FindItemStr { | |
81 my ($this,$item) = @_; | |
82 | |
83 for (my $i = 0; $i < @$this; $i++ ) { | |
84 return $i if $this->[$i] eq $item | |
85 } | |
86 return undef; | |
87 } | |
88 | |
71 sub save { | 89 sub save { |
72 my ($this,$ctx) = @_; | 90 my ($this,$ctx) = @_; |
73 | 91 |
74 $ctx->AddVar( item => $_ ) foreach @$this; | 92 $ctx->AddVar( item => $_ ) foreach @$this; |
75 } | 93 } |