# HG changeset patch # User wizard # Date 1282278523 -14400 # Node ID 4369d5458bb6fd3c3de54ecb3f3e24f5533c20d2 # Parent b04e978d6d5ab4488c8daa05bcfe0f51a3e94783 minor fixes diff -r b04e978d6d5a -r 4369d5458bb6 Lib/IMPL/Web/TT/Collection.pm --- a/Lib/IMPL/Web/TT/Collection.pm Wed Aug 18 03:14:57 2010 +0400 +++ b/Lib/IMPL/Web/TT/Collection.pm Fri Aug 20 08:28:43 2010 +0400 @@ -12,13 +12,14 @@ return if $method eq 'DESTROY'; - if ($method =~ /^add(\w+)/) { - my ($name,$args) = @_; - return $this->appendChild($this->document->CreateControl($name,$1,$args)); - } - if ( @_ >= 1 ) { # set + + if ($method =~ /^add(\w+)/) { + my ($name,$args) = @_; + return $this->appendChild($this->document->CreateControl($name,$1,$args)); + } + # we can't assing a node, so this is a dynamic property return $this->nodeProperty($method,@_); } else { @@ -31,10 +32,10 @@ my @result = $this->selectNodes($method); return $result[0] if @result; - return; } } - die new IMPL::Exception("We shoud never get here, this is a bug!!!"); + + return; } sub as_list { diff -r b04e978d6d5a -r 4369d5458bb6 Lib/IMPL/Web/TT/Document.pm --- a/Lib/IMPL/Web/TT/Document.pm Wed Aug 18 03:14:57 2010 +0400 +++ b/Lib/IMPL/Web/TT/Document.pm Fri Aug 20 08:28:43 2010 +0400 @@ -11,6 +11,7 @@ use IMPL::Web::TT::Collection; use IMPL::Web::TT::Control; use Carp; +use Encode(); BEGIN { private property _provider => prop_all; @@ -77,6 +78,9 @@ this => $this, render => sub { $this->_process(@_); + }, + encode => sub { + Encode::encode('utf8',shift); } }, RECURSION => 1,