comparison Lib/IMPL/Web/View/TTControl.pm @ 236:2904da230022

DOM refactoring
author sergey
date Mon, 15 Oct 2012 04:23:01 +0400
parents 2530d1bb9638
children b8c724f6de36
comparison
equal deleted inserted replaced
235:a4d9126edcbb 236:2904da230022
39 $this->template( $template ) or die new IMPL::ArgumentException("A template is required"); 39 $this->template( $template ) or die new IMPL::ArgumentException("A template is required");
40 $this->context( $context ) or die new IMPL::ArgumentException("A context is required"); 40 $this->context( $context ) or die new IMPL::ArgumentException("A context is required");
41 41
42 $this->id($name . "-" . _GetNextId()) unless $this->id; 42 $this->id($name . "-" . _GetNextId()) unless $this->id;
43 43
44 weaken($this); # prevent cyclic references produced by the code below 44 #TODO: deprecated, cleanup
45 #weaken($this); # prevent cyclic references produced by the code below
45 46
46 $context->stash->set('append', sub { $this->appendChild(@_); undef; } ); 47 #$context->stash->set('append', sub { $this->appendChild(@_); undef; } );
47 $context->stash->set('select', sub { $this->selectNodes(@_); } ); 48 #$context->stash->set('select', sub { $this->selectNodes(@_); } );
48 } 49 }
49 50
50 sub InitInstance { 51 sub InitInstance {
51 my ($this,$args) = @_; 52 my ($this,$args) = @_;
52 53