Philipp von Weitershausen wrote:
Not sure what official terminology glossary you're basing this on, but
we often refer to IZopeDublinCore(myobj) as the IZopeDublinCore
adapter of myobj. Whatever is called to instantiate that object we
call the adapter factory or adapter implementation. The
Philipp von Weitershausen wrote:
IZopeDublinCore(obj)
is a flexible version of
ZDCAnnotatableAdapter(obj)
Flexible, because a different implementation that ZDCAnnotatableAdapter
might be used. That's dispatched through the adapter registry.
Right, exactly.
IZopeDublinCore(myobj)
Jean-Marc Orliaguet wrote:
once you have that utility / adapter you should be able to call it like:
converter = getAdapterFor(123, type=IToStringConverter)
strResult = converter.convert(123)
Not quite, what I'm looking to do is more along the lines of:
mystr = getAdapter(123,str)
(where
Hi All,
Chris Withers wrote:
Jean-Marc Orliaguet wrote:
once you have that utility / adapter you should be able to call it like:
converter = getAdapterFor(123, type=IToStringConverter)
strResult = converter.convert(123)
Not quite, what I'm looking to do is more along the lines of:
Chris Withers wrote:
Chris Withers wrote:
Jean-Marc Orliaguet wrote:
once you have that utility / adapter you should be able to call it like:
converter = getAdapterFor(123, type=IToStringConverter)
strResult = converter.convert(123)
Not quite, what I'm looking to do is more along the
Chris Withers wrote:
Philipp von Weitershausen wrote:
Not sure what official terminology glossary you're basing this on,
but we often refer to IZopeDublinCore(myobj) as the IZopeDublinCore
adapter of myobj. Whatever is called to instantiate that object we
call the adapter factory or adapter
Philipp von Weitershausen wrote:
from zope.component import provideAdapter
provideAdapter(str,(int,),str)
from zope.component import getAdapter
getAdapter(123,str)
'123'
Yay! That's _exactly_ what I want.
And that's exactly what I meant -- and wrote about half way up the
thread. :)
Chris Withers wrote:
provideAdapter(to_date,(str,int),DateTime)
This registers a multi adapter for (a_string, an_integer), like views
are multi-adapters for (context, request). You want to say:
provideAdapter(to_date, (str,), DateTime)
provideAdapter(to_date, (int,), DateTime)
Philipp von Weitershausen wrote:
Chris Withers wrote:
Chris Withers wrote:
Jean-Marc Orliaguet wrote:
once you have that utility / adapter you should be able to call it
like:
converter = getAdapterFor(123, type=IToStringConverter)
strResult = converter.convert(123)
Not quite, what I'm
What's the difference between zope:view, browser:view, browser:page and
browser:viewlet?
I'm trying to register an adapter in such a way that I can do the
following in a page template:
p tal:content=structure someobj/@@render/
Which of the myriad flavours of view registration should I be
Chris Withers wrote:
What's the difference between zope:view, browser:view, browser:page and
browser:viewlet?
I would strongly encourage you to buy Philipp's book when the second edition
comes out, and read some of the available existing documents (e.g.
worldcookery.com, the Zope 3 wiki
Martin Aspeli wrote:
Chris Withers wrote:
What's the difference between zope:view, browser:view, browser:page and
browser:viewlet?
I would strongly encourage you to buy Philipp's book when the second edition
comes out, and read some of the available existing documents (e.g.
Chris Withers wrote:
What's the difference between zope:view, browser:view, browser:page and
browser:viewlet?
It's a mess. Here's the gist:
zope:adapter
Registers an adapter and optionally applies a permission to the
interface that you're adapting to, e.g.::
adapter
On Thu, Nov 16, 2006 at 10:21:09AM +0100, Philipp von Weitershausen wrote:
How would I _really_ return None from an adapter?
You don't. You call the adaption with a default value (e.g. None) to
cover for the coudln't adapt case:
getAdapter('moo', DateTime, None)
That doesn't work,
On 11/15/06, Christian Theune [EMAIL PROTECTED] wrote:
Hi,
just a quick reminder: Today is a bugday to help get Zope 3.3 virtually
free of bugs (by handling bugs from the collector.)
Any status report on this? The collector state(s) seem unchanged.
--
Jeff Shell
On 11/16/06, Jeff Shell [EMAIL PROTECTED] wrote:
Any status report on this? The collector state(s) seem unchanged.
The collector is software. For some reason, it doesn't seem to want
to work for me at least. It's possible that this capriciousness on
the part of the collector isn't just aimed
Philipp von Weitershausen wrote at 2006-11-15 21:11 +0100:
...
Not sure what official terminology glossary you're basing this on
I am basing this on the meaning of english words.
An adapter is something that adapts (and not something that is adapted).
adapt is a transitive verb. It applies to
Jean-Marc Orliaguet wrote at 2006-11-15 20:51 +0100:
...
but what problem is all this supposed to solve? are you guys writing a
PhD or something .-) ?
Well chosen terminology is a key to understanding.
Therefore, it is justified to discuss about it.
--
Dieter
Hi,
Fred Drake wrote:
On 11/16/06, Jeff Shell [EMAIL PROTECTED] wrote:
Any status report on this? The collector state(s) seem unchanged.
The collector is software. For some reason, it doesn't seem to want
to work for me at least. It's possible that this capriciousness on
the part of the
Hi,
I am having trouble debugging viewlets that redirect to Unauthorized
pages. Here is the synopsis. We have a dashboard page with a bunch
of viewlets displaying information about all different parts of the
system. When one viewlet tries to access forbidden attributes, the
whole page gets
Philipp von Weitershausen wrote:
browser:view
Like zope:view, except:
* the request type (second adapted object) defaults to
IBrowserDefaultLayer
* the permission always applies to 'publishTraverse',
'browserDefault' and '__call__' attributes, in addition to the
Paul Carduner wrote:
I am having trouble debugging viewlets that redirect to Unauthorized
pages. Here is the synopsis. We have a dashboard page with a bunch
of viewlets displaying information about all different parts of the
system. When one viewlet tries to access forbidden attributes, the
Philipp von Weitershausen wrote:
Shane Hathaway wrote:
Philipp von Weitershausen wrote:
browser:view
Like zope:view, except:
* the request type (second adapted object) defaults to
IBrowserDefaultLayer
* the permission always applies to 'publishTraverse',
Hi All,
Can a named adapter find out the name it was registered with during the
adaptation process?
This is the only way I can think to do it, but results in the thing
calling methods on the adapter passing in the name to every method call
to get the information across, which seems a bit
Shane Hathaway wrote:
Philipp von Weitershausen wrote:
Shane Hathaway wrote:
Philipp von Weitershausen wrote:
browser:view
Like zope:view, except:
* the request type (second adapted object) defaults to
IBrowserDefaultLayer
* the permission always applies to
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:
Tom Gross wrote:
the presence of a intid-utility gives a strange behavior when adding
other objects to a zope3 container.
(test attached)
What's the error/failure? Please be more specific as to what the actual
problem is.
--
http://worldcookery.com -- Professional Zope documentation
-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
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chris Withers wrote:
Philipp von Weitershausen wrote:
IZopeDublinCore(obj)
is a flexible version of
ZDCAnnotatableAdapter(obj)
Flexible, because a different implementation that ZDCAnnotatableAdapter
might be used. That's dispatched
Philipp von Weitershausen wrote:
Shane Hathaway wrote:
However, I'm wondering what browser:page does to make something
publishable, that browser:view doesn't do.
It creates a new class with an extra mix-in class that has a
browserDefault method which in turn points to the template, method or
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Shane Hathaway wrote:
Philipp von Weitershausen wrote:
Shane Hathaway wrote:
However, I'm wondering what browser:page does to make something
publishable, that browser:view doesn't do.
It creates a new class with an extra mix-in class that has a
31 matches
Mail list logo