[Grok-dev] Re: grok.Skin question.

Jan-Wijbrand Kolman janwijbrand at gmail.com
Fri Jul 25 02:37:08 EDT 2008


Fernando Correa Neto wrote:
snip
> But then when you declare your skin naively like this:
> 
> class MyGrokSkin(grok.Skin, IDivFormLayer):
>     grok.name('youwhish')
>     grok.layer(MyGrokLayer)
> 
> 
> It is raises a conflict error like this:
> 
> zope.configuration.xmlconfig.ZopeXMLConfigurationError: File
> "/Users/fcorrea/grokapps/grokenv/z3cformtest/parts/app/site.zcml",
> line 4.0-4.33
>     ZopeXMLConfigurationError: File
> "/Users/fcorrea/grokapps/grokenv/z3cformtest/src/z3cformtest/configure.zcml",
> line 5.2-5.27
>     TypeError: Error when calling the metaclass bases
>     metaclass conflict: the metaclass of a derived class must be a
> (non-strict) subclass of the metaclasses of all its bases

I think you got confused (as I am constantly as well) by the way Grok 
wants you to register skins. See the thread I started at:

  http://permalink.gmane.org/gmane.comp.web.zope.grok.devel/5848

I think *for* now you'd have to do:

  class AggregationOfAllSkinsIWanted(IDivFormLayer):
      pass

  class MyGrokSkin(grok.Skin): # This will merely trigger a registration.
     grok.name('youwhish')
     grok.layer(AggregationOfAllSkinsIWanted)


kind regards,
jw



More information about the Grok-dev mailing list