diegoles / closure-library

Automatically exported from code.google.com/p/closure-library
0 stars 0 forks source link

Design flaw with goog.ui.decorate #528

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
It is not possible to take advantage of the child component lifecycle 
management that addChild/removeChild provides with goog.ui.decorate.

 the following call order is supported; however, the call to decorate is deprecated:

    this.addChild(this.loadingIndicator_, false);
    this.loadingIndicator_.decorate(goog.dom.getElementByClass('loading', element));  // deprecated

The docs say to use goog.ui.decorate instead of 
goog.ui.Control.prototype.decorate

Lifecycle management is not possible with goog.ui.decorate because it throws 
"component already rendered" error

Original issue reported on code.google.com by j...@highvolumeseller.com on 15 Jan 2013 at 3:41

GoogleCodeExporter commented 8 years ago
Please close issue, I'm a bonehead. My IDE was confusing static vs instance 
methods

Original comment by j...@highvolumeseller.com on 15 Jan 2013 at 3:53

GoogleCodeExporter commented 8 years ago

Original comment by Nicholas.J.Santos on 15 Jan 2013 at 3:55