[Grok-dev] Grok 1.0 final?
optilude+lists at gmail.com
Wed Apr 15 12:47:23 EDT 2009
Jan-Wijbrand Kolman wrote:
> Martijn Faassen wrote:
>>> Can you elaborate on this? What does the subclassing support do?
>> Currently you when you try to define a common base class for views Grok
>> tends to get confused and may try to associate with the wrong templates
>> and so on.
>> JW can elaborate on this and give practical use cases.
> If you define a view component in one module and subclass it in another
> module the template associated to the baseclass cannot be found anymore.
> This seemingly simple problem proofed to be very difficult to reason
> about and solve as it involved edgy edge cases in how module-level
> directives and their defaults are handled in martian.
> As result Martijn and I have been (on and off) working on getting the
> module-level directive default straightened out and also concluded Grok
> would be simpler to use if we'd split the View component into a
> view-with-template-component and view-with-just-a-render-method component.
For the record, I need a view-with-no-rendering-at-all component. I want
to be able to define a "utility" view that I can traverse to and invoke
methods on from templates.
> For backwards compatibility the first will keep the name "View" and the
> latter will be called "CodeView".
Sure. What will you call the one with no 'render' or default __call__? ;-)
> This still has to land. I'm making some progress (in the
> http://svn.zope.org/grok/branches/jw-newer-martian/ branch) but only slowly.
> Martijn - what about a pair-programming-date!? ;)
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book
More information about the Grok-dev