Am 11.04.2012, 10:16 Uhr, schrieb yuppie <[email protected]>:
Just a general remark: The last time we added a warning to getToolByName it had to be taken back out. The protest was too big. No one wanted to spend the time on all the third-party packages that still use that API. What's worse, back then even the CMF packages were not switched to a pure utility model and would emit these warnings as well.
I think I remember. No warning then. We've still got a few instances of methods (in ActionsTool) using it but I'm torn between replacing them with the utility lookup plus fallback or leaving them as they are for 2.3 and changing them without fallback later. The current code provides an elegant lookup with fallback.
AFAICS the only thing we need to do for backwards compatibility is using registerToolInterface. So it isn't urgent to deprecate and remove getToolByName.
Okay.
It might be useful to write a howto for people who want to modernize their code.
Definitely. Charlie -- Charlie Clark Managing Director Clark Consulting & Research German Office Kronenstr. 27a Düsseldorf D- 40217 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 _______________________________________________ Zope-CMF maillist - [email protected] https://mail.zope.org/mailman/listinfo/zope-cmf See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests
