@@ -44,9 +44,17 @@ cls.ReturnValuesView = function(id, name, container_class)
4444
4545 this . _create_view = function ( return_values )
4646 {
47+ this . _text_search . setContainer ( this . _container ) ;
48+ this . _text_search . setFormInput ( window . views [ this . id ] . getToolbarControl ( this . _container ,
49+ "return-values-text-search" ) ) ;
4750 this . _container . clearAndRender ( templates . return_values ( return_values , this . _search_term ) ) ;
4851 } ;
4952
53+ this . ondestroy = function ( )
54+ {
55+ this . _text_search . cleanup ( ) ;
56+ } ;
57+
5058 this . _remove_bound_view = function ( )
5159 {
5260 this . _create_view_bound = null ;
@@ -71,22 +79,6 @@ cls.ReturnValuesView = function(id, name, container_class)
7179 }
7280 } ;
7381
74- this . _on_view_created = function ( msg )
75- {
76- if ( msg . id == "return-values" )
77- {
78- this . _text_search . setContainer ( msg . container ) ;
79- this . _text_search . setFormInput ( window . views [ this . id ] . getToolbarControl ( msg . container ,
80- "return-values-text-search" ) ) ;
81- }
82- } ;
83-
84- this . _on_view_destroyed = function ( msg )
85- {
86- if ( msg . id == "return-values" )
87- this . _text_search . cleanup ( ) ;
88- } ;
89-
9082 this . _init = function ( id , name , container_class )
9183 {
9284 View . prototype . init . call ( this , id , name , container_class ) ;
@@ -97,8 +89,6 @@ cls.ReturnValuesView = function(id, name, container_class)
9789 this . _text_search = new TextSearch ( 1 ) ;
9890 this . _text_search . add_listener ( "onbeforesearch" , this . _onbeforesearch . bind ( this ) ) ;
9991
100- window . messages . addListener ( "view-created" , this . _on_view_created . bind ( this ) ) ;
101- window . messages . addListener ( "view-destroyed" , this . _on_view_destroyed . bind ( this ) ) ;
10292 window . messages . addListener ( "thread-continue-event" , this . _remove_bound_view . bind ( this ) ) ;
10393
10494 window . event_handlers . input [ "return-values-text-search" ] = function ( event , target )
0 commit comments