[KSS-checkins] r49270 - kukit/kss.zope/trunk/kss/zope

reebalazs at codespeak.net reebalazs at codespeak.net
Sun Dec 2 12:53:05 CET 2007


Author: reebalazs
Date: Sun Dec  2 12:53:05 2007
New Revision: 49270

Modified:
   kukit/kss.zope/trunk/kss/zope/interfaces.py
   kukit/kss.zope/trunk/kss/zope/registry.txt
Log:
Add lookup_selector method to interface, and test

Modified: kukit/kss.zope/trunk/kss/zope/interfaces.py
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/interfaces.py	(original)
+++ kukit/kss.zope/trunk/kss/zope/interfaces.py	Sun Dec  2 12:53:05 2007
@@ -41,6 +41,12 @@
     def lookup_commandset(id):
         '''Return a commandset class for the given id'''
 
+    def lookup_selector(id):
+        '''Return a selector class for the given id.
+        
+        Id must follow the namespace-name format, if not in the core.
+        '''
+
 class ICommandSet(Interface):
     'Methods of this class implement a command set'
 

Modified: kukit/kss.zope/trunk/kss/zope/registry.txt
==============================================================================
--- kukit/kss.zope/trunk/kss/zope/registry.txt	(original)
+++ kukit/kss.zope/trunk/kss/zope/registry.txt	Sun Dec  2 12:53:05 2007
@@ -30,6 +30,12 @@
   >>> list(registry.plugins())
   [('kss-core', <kss.base.config.KSSCore object at ...>)]
 
+Javascript
+----------
+
+We can also query the javascript for the plugins, both the actual plugin
+code, and extra dependencies:
+
   >>> list(registry.javascripts())
   ['.../kukit/utils.js', '.../kukit/errors.js', ...]
 
@@ -37,6 +43,10 @@
   >>> list(registry.extra_javascripts())
   ['.../3rd_party/base2-dom-fp.js', '.../3rd_party/sarissa.js']
 
+
+Commandsets
+-----------
+
 The registry can also be used to lookup a commandset. If a commandset
 is requested which is not available we will get a KeyError.
 
@@ -53,6 +63,14 @@
 As you can see it returns a factory (in this case the class) for the
 commandset.
 
+Selectors
+---------
+
+A given selector class can be queried as well:
+
+  >>> registry.lookup_selector('css')
+  <class 'kss.base.coreselectors.css'>
+
 
 BBB
 ===


More information about the Kukit-checkins mailing list