Mercurial > pub > Impl
diff 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 |
line wrap: on
line diff
--- a/Lib/IMPL/Object/List.pm Fri Aug 20 08:28:43 2010 +0400 +++ b/Lib/IMPL/Object/List.pm Fri Aug 20 16:33:37 2010 +0400 @@ -68,6 +68,24 @@ return $this; } +sub FindItem { + my ($this,$item) = @_; + + for (my $i = 0; $i < @$this; $i++ ) { + return $i if $this->[$i] == $item + } + return undef; +} + +sub FindItemStr { + my ($this,$item) = @_; + + for (my $i = 0; $i < @$this; $i++ ) { + return $i if $this->[$i] eq $item + } + return undef; +} + sub save { my ($this,$ctx) = @_;