FB wrote:
On Tue, Mar 27, 2007 at 06:03:54PM +0200, Dominique Lederer wrote:
so if i create a class which inherits from BrowserView, and then register it via
zcml as browser:page, it becomes adaptes to IBrowserRequest an turns to a
BrowserPage (via the on-the-fly created class)? so inheriting from BrowserPage
instead from BrowserView would make no sense with my example?

It doesn't event make sense to inherit from BrowserView because a 
view-class is just a mixin. A class like this is enough:

class MyView(object):
   def mySpecialMethod(self):

Even though browser:page's magic doesnt' require it, I strongly suggest to inherit from BrowserView or BrowserPage nonetheless, even if it's only for documentation purposes... (where are self.request and self.context coming from, where's browserDefault coming from?)

http://worldcookery.com -- Professional Zope documentation and training

Zope3-users mailing list

Reply via email to