# HG changeset patch # User Sylvain Thénault # Date 1265227376 -3600 # Node ID db672bef1078d20e58da15607bad7a734bf03086 # Parent a55fb2745644e6d7b08d120301dc88794aaa6010 more details on selectors debugging diff -r a55fb2745644 -r db672bef1078 doc/book/en/development/devcore/vreg.rst --- a/doc/book/en/development/devcore/vreg.rst Wed Feb 03 21:02:39 2010 +0100 +++ b/doc/book/en/development/devcore/vreg.rst Wed Feb 03 21:02:56 2010 +0100 @@ -164,6 +164,8 @@ with appropriate selectors. +.. CustomSelectors_ + Defining your own selectors ``````````````````````````` XXX objectify_selector, EntitySelector, EClassSelector... @@ -192,6 +194,17 @@ 2009-01-09 16:43:52 - (cubicweb.selectors) WARNING: selector one_line_rset returned 0 for +Take care not filtering-out messages whose log level is <= LOG_WARNING! +You can also give to traced_selection the registry ids of objects on which to debug +you want to debug selection ('wfhistory' in the example above). -Take care not filtering-out messages whose log level is <= LOG_WARNING! \ No newline at end of file +Also, if you're using python 2.4, which as no 'with' yet, you'll have to to it +the following way: + +.. sourcecode:: python + + from cubicweb import selectors + selectors.TRACED_OIDS = ('wfhistory',) + mycomp = self._cw.vreg['views'].select('wfhistory', self._cw, rset=rset) + selectors.TRACED_OIDS = ()