In discussions on the mailing list about Painters, Brushes, and so on, it
came up that there is some confusion with the current location of
#updateRoot: and #updateUrl:.
Both of these methods are perfectly appropriate for WAPainter to handle and
depend only on stuff that is in Seaside-Core. WAUpdateRootVisitor and
WAUpdateUrlVisitor also fit fine in Core (though their tests are still in
the Tests-Components package, I notice).
Having these methods on WAPainter means that Painters can act as the root
object of an Application's render loop. It also means that Painters have
the ability to update the root and the URL, which is arguably a pretty
important thing that you want to be able to group with the rest of the code
in the Painter.
The confusion is that these methods will not be called on a Painter unless
the Painter is (a) the root object of the render loop; or (b) listed in the
#children method of the Presenter that is using it. Since Painters are
designed so they can be used in a throw-away fashion, they will often be
used in cases where neither of these is true and in these cases those
methods will not be called. Confusing for users, I think.
The simplest solution is to simply move those methods back down to
WAPresenter which means that, where Painters can now be used either
persistent or throw-away, they would now only be useable in a throw-away
situation.
The two visitors would need to be modified to take no action for WAPainter
instances.
Original issue reported on code.google.com by
jfitz...@gmail.comon 24 Jul 2009 at 7:51