Re: [Zope3-dev] Re: Can an adapter find out what name it was registered for?

2006-11-30 Thread Chris Withers

Dieter Maurer wrote:

The "str" example shows also that it is not sensible
that the adapter registry framework gives the adapter (factory)
a way to determine its name ("str" has nothing where the "name"
could be sticked in).


True enough, I guess I'll just have to stick with my hack or Tres' 
currying suggestion...


Chris

--
Simplistix - Content Management, Zope & Python Consulting
   - http://www.simplistix.co.uk

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



[Zope3-dev] Re: provider: adapter doesn't support nocall:?

2006-11-30 Thread Philipp von Weitershausen

Roy Mathew wrote:

I find that the provider syntax doesn't allow a nocall:
specifier.


nocall: is only works with path expressions.


My intent is to call the update at a separate place from the
render. How else might I achieve this? I can only think of 
explicitly getting the provider in python code, like so


vmgr = zope.component.getMultiAdapter(
  (self.context, self.request, self), 
  IViewletManager, name='q2d-prov')


and doing the the update and render separately.


Right, except that we usually adapt to IContentProvider (IViewletManager 
is an implementation detail).


Btw, wrong list. Questions about *using* Zope 3 should go to 
[EMAIL PROTECTED]



--
http://worldcookery.com -- Professional Zope documentation and training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com