Hi,
I am big fan of five.grok. I am big fan of everything which does not involve
writing undocumented XML by hand (read: ZCML). However, as Grok is
retrofitted into Plone, there are some corner cases where it bites your leg
and you start cursing and you go back to your ZCML and BrowserViews and you
will be depressed the whole day and then you cry and weep at home.
One of these corner cases is inheritance. Is it possible to inherit some
methods from BrowserView and use these methods in grok.View? Basically, is
it possible to override the existing BrowserViews using grok.View? This is
because the Plone community contains thousands of thousands of BrowserViews
and just copy-pasting their code when doing grok'ing is not just practical.
E.g.
class MyVeryOldPloneView(BrowserView):
class MyGrokkedSupaDupaCoolVersion(grok.View, MyVeryOldPloneView)
grok.layer(IMyTheme)
I think the first problem will be that BrowserView and grok.View have
different __call__() method. Could it be possible to make a "compatible"
grok.OldFashionedView which you could mix-in with BrowserViews?
-----
Mikko Ohtamaa
mFabrik - Freedom Delivered.
Web site - http://mfabrik.com
Mobile site - http://mfabrik.mobi
Blog - http://blog.mfabrik.com
--
View this message in context:
http://plone.293351.n2.nabble.com/Mixing-grok-View-and-BrowserView-in-inheritance-tp5529699p5529699.html
Sent from the Product Developers mailing list archive at Nabble.com.
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers