Mercurial > pub > Impl
diff Lib/Schema/Form/Container.pm @ 49:16ada169ca75
migrating to the Eclipse IDE
author | wizard@linux-odin.local |
---|---|
date | Fri, 26 Feb 2010 10:49:21 +0300 |
parents | 03e58a454b20 |
children | 4267a2ac3d46 |
line wrap: on
line diff
--- a/Lib/Schema/Form/Container.pm Fri Feb 26 01:43:42 2010 +0300 +++ b/Lib/Schema/Form/Container.pm Fri Feb 26 10:49:21 2010 +0300 @@ -1,41 +1,41 @@ -package Schema::Form::Container; -use Form::Container; -use Common; -use base qw(Schema::Form::Item); - -BEGIN { - DeclareProperty Children => ACCESS_READ; -} - -sub CTOR { - my ($this,%args) = @_; - - $this->SUPER::CTOR(@args{qw(Name isMulti Filters)}); - - $this->{$Children} = []; - -} - -sub AddChild { - my ($this,$child) = @_; - - not grep { $_->Name eq $child->Name } $this->Children or die new Exception("The item already exists",$child->Name); - - push @{$this->{$Children}},$child; -} - -sub FindChild { - my ($this,$name) = @_; - - my @result = grep { $_->Name eq $name} $this->Children; - return $result[0]; -} - -sub Dispose { - my ($this) = @_; - - delete $this->{$Children}; - - $this->SUPER::Dispose; -} -1; \ No newline at end of file +package Schema::Form::Container; +use Form::Container; +use Common; +use base qw(Schema::Form::Item); + +BEGIN { + DeclareProperty Children => ACCESS_READ; +} + +sub CTOR { + my ($this,%args) = @_; + + $this->SUPER::CTOR(@args{qw(Name isMulti Filters)}); + + $this->{$Children} = []; + +} + +sub AddChild { + my ($this,$child) = @_; + + not grep { $_->Name eq $child->Name } $this->Children or die new Exception("The item already exists",$child->Name); + + push @{$this->{$Children}},$child; +} + +sub FindChild { + my ($this,$name) = @_; + + my @result = grep { $_->Name eq $name} $this->Children; + return $result[0]; +} + +sub Dispose { + my ($this) = @_; + + delete $this->{$Children}; + + $this->SUPER::Dispose; +} +1;