Closed EAlexRojas closed 9 years ago
Seems basically fine to me.
My only question is whether we need both a loadChild()
and a load()
method. Theoretically load()
exists so an application or subclass can override it. AFAICT no one is actually doing that though. And if an application did want to override existing behavior, then couldn't it just override loadChild()
? Overriding loadChild()
is more powerful than overriding load()
because the former can return a promise. @cjolif, thoughts?
@wkeese
That said I'm fine with dropping load(). So if @wkeese is still in favor of that, @EAlexRojas I suggest you drop it.
I didn't realize that load()
could return a Promise but yes, I'm still in favor of dropping load()
.
I updated the PR dropping load()
Cool. I pushed this as 7cfadc1409d31269e19de7c9901ed8de080d9ce7.
The
show()
andhide()
methods load a child before show it or hide it, but sometimes the widget could want only to load a child dynamically, either by using a controller to load it or using its ownload()
method.In this PR I take the common code used on the
show()
andhide()
methods related to loading a child and I extract it to a new method ->loadChild()
(This name has to be discussed in order to avoid confusion between this method and theload()
method)