[Checkins]
SVN: Sandbox/ulif/zope.introspector/src/zope/introspector/viewinfo.txt
Register skins without grok in tests.
Uli Fouquet
uli at gnufix.de
Wed Jun 18 11:47:36 EDT 2008
Log message for revision 87526:
Register skins without grok in tests.
Changed:
U Sandbox/ulif/zope.introspector/src/zope/introspector/viewinfo.txt
-=-
Modified: Sandbox/ulif/zope.introspector/src/zope/introspector/viewinfo.txt
===================================================================
--- Sandbox/ulif/zope.introspector/src/zope/introspector/viewinfo.txt 2008-06-18 14:50:09 UTC (rev 87525)
+++ Sandbox/ulif/zope.introspector/src/zope/introspector/viewinfo.txt 2008-06-18 15:47:32 UTC (rev 87526)
@@ -93,23 +93,14 @@
>>> sorted(list(getSkins()))
[]
-Let's create and grok a skin now::
+Let's create and grok a skin now. We do this by registering the
+``ITestLayer`` as a skin. This is possible, because skins are actually
+sets of layers.
- >>> class OurSkin(grok.Skin):
- ... grok.name('ourskin')
- ... grok.layer(ITestLayer)
+ >>> from zope.publisher.interfaces.browser import IBrowserSkinType
+ >>> from zope.component.interface import provideInterface
+ >>> provideInterface('ourskin', ITestLayer, IBrowserSkinType)
-To grok the skin, we first need to grok the skin grokker itself::
-
- >>> from grok.meta import SkinGrokker
- >>> grok.grok_component('SkinGrokker', SkinGrokker)
- True
-
-Now we can actually grok the skin::
-
- >>> grok.grok_component('OurSkin', OurSkin)
- True
-
We should now see this skin::
>>> sorted(list(getSkins()))
More information about the Checkins
mailing list