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
Previously Chris Withers wrote:
Really? Certainly in Zope 2, prettymuch every persistent objects needs
to be getId()'able...
The fact that something is true in Zope 3 does not necessarily make it a
good idea.
Wichert.
--
Wichert Akkerman [EMAIL PROTECTED]It is simple to make things.
On Wednesday 29 November 2006 03:37, Wichert Akkerman wrote:
The fact that something is true in Zope 3 does not necessarily make it a
good idea.
But the chances are pretty high! ;-)
Regards,
Stephan
--
Stephan Richter
CBU Physics Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web
Previously Stephan Richter wrote:
On Wednesday 29 November 2006 03:37, Wichert Akkerman wrote:
The fact that something is true in Zope 3 does not necessarily make it a
good idea.
But the chances are pretty high! ;-)
Of course I meant to say 'Zope 2' there, which does reduce the chances.
Chris Withers wrote at 2006-11-28 18:09 +:
Benji York wrote:
Chris Withers wrote:
I don't think it'll be a common pattern, but it doesn't feel right to
me that a named adapter (ie: one registered with a specific name) has
no way of finding out what name it has been registered with...
Benji York wrote:
Chris Withers wrote:
I don't think it'll be a common pattern, but it doesn't feel right to
me that a named adapter (ie: one registered with a specific name) has
no way of finding out what name it has been registered with...
Because the same adapter can be registered more
Tres Seaver wrote:
for name in ('vindaloo', 'madras', 'tiki_masala'):
globals()[name] = MNA_factory_maker(name)
and then in ZCML:
adapter for=.interfaces.IChicken
provides=.interfaces.ICurry
name=vindaloo
factory=.adapters.vindaloo /
...but
Chris Withers wrote:
Benji York wrote:
Chris Withers wrote:
I don't think it'll be a common pattern, but it doesn't feel right to
me that a named adapter (ie: one registered with a specific name) has
no way of finding out what name it has been registered with...
Because the same adapter can
On Tue, Nov 28, 2006 at 06:12:19PM +, Chris Withers wrote:
Is there a python-only way to register adapters instead of in ZCML and,
if it exists, is it safe to use in conjunction with the normal zcml dances?
There's always a way :)
You could just do what the directive does - call the
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Benji York wrote:
Chris Withers wrote:
Benji York wrote:
Chris Withers wrote:
I don't think it'll be a common pattern, but it doesn't feel right to
me that a named adapter (ie: one registered with a specific name) has
no way of finding out
Stephan Richter wrote:
On Friday 17 November 2006 03:43, Chris Withers wrote:
What do you suggest I do when the adapter needs to know the name it was
registered for?
You can make the name part of the adapter API.
Not sure what you mean by this?
However, I would suggest revising the design;
Chris Withers wrote:
I don't think it'll be a common pattern, but it doesn't feel right to me
that a named adapter (ie: one registered with a specific name) has no
way of finding out what name it has been registered with...
Because the same adapter can be registered more than once, it would
On Monday 27 November 2006 11:17, Benji York wrote:
This seems somewhat analogous to a Python object being given multiple
names. In that case too, there is no way for the object to know what
it's names are.
Great analogy. I used that one before too, but did not think of it this time.
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chris Withers wrote:
Stephan Richter wrote:
On Friday 17 November 2006 03:43, Chris Withers wrote:
What do you suggest I do when the adapter needs to know the name it was
registered for?
You can make the name part of the adapter API.
Not sure
On Friday 17 November 2006 03:43, Chris Withers wrote:
What do you suggest I do when the adapter needs to know the name it was
registered for?
You can make the name part of the adapter API.
However, I would suggest revising the design; I have never come across a
scenario where I wanted the
Chris Withers wrote:
Philipp von Weitershausen wrote:
Chris Withers wrote:
Can a named adapter find out the name it was registered with during
the adaptation process?
Nope.
I can see why it's that way, but it seems a shame and maybe even an
oversight :-/
What do you suggest I do when
Chris Withers wrote:
Can a named adapter find out the name it was registered with during the
adaptation process?
Nope.
--
http://worldcookery.com -- Professional Zope documentation and training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Philipp von Weitershausen wrote:
Chris Withers wrote:
Can a named adapter find out the name it was registered with during the
adaptation process?
Nope.
But you can create the adapter factories in such a way that they know
that name, via a
18 matches
Mail list logo