Hi All,
I find myself often having to define pure marker interfaces for each
class that I define, purely so I can register adapters for objects of
that class.
How do people feel about:
- being able to register an adapter as follows:
adapter
for=.myclasses.MyClass
On 11/9/06, Chris Withers [EMAIL PROTECTED] wrote:
I'm expecting people to say NO! very loudly, but I'm interested in the
real reasons for why this is bad.
Well it removes the possibility of switching out the class, which
begs the question why you would have an adapter in the first place.
On 11/9/06, Chris Withers [EMAIL PROTECTED] wrote:
It's not one to one:
adapter
for=.myclasses.MyClassA
provides=.interfaces.ISomething
factory=.adapters.MyAdapter1
/
adapter
for=.myclasses.MyClassB
provides=.interfaces.ISomething
factory=.adapters.MyAdapter1
Sorry about the premature sending, I don't know what button I pressed...
Here we go again:
So instead of making a marker interface, which is two lines of code,
and two registrations, a total of six lines (with the imports), you
have an extra ZCML registration statement, which is three lines of
On Thu, 2006-09-11 at 11:13 +, Chris Withers wrote:
I find myself often having to define pure marker interfaces for each
class that I define, purely so I can register adapters for objects of
that class.
I do this frequently when I want to adapt classes I have no control over
(such as in
On 11/9/06, Chris Withers [EMAIL PROTECTED] wrote:
Why do you say extra ZCML registration? You need that ZCML
registration whether or not you have to write the marker interface...
Sure, but with the marker interface you need only one. You need one
for each class, in your example, thats two. So
Hi,
Shane Hathaway wrote:
I'm working on enhancing zope.app.apidoc, but I ran into an exception
that's hard to decipher. I've attached the traceback. I don't know
which __init__() it's complaining about, and I don't know how to find
out. What can I do to find out which __init__() the
Chris Withers wrote:
Hi All,
I find myself often having to define pure marker interfaces for each
class that I define, purely so I can register adapters for objects of
that class.
How do people feel about:
- being able to register an adapter as follows:
adapter
for=.myclasses.MyClass
Jim Fulton wrote:
adapter
for=.myclasses.MyClass
provides=.interfaces.ISomething
factory=.adapters.MyAdapter
/
I think it is a fine idea. That's why it has been supported for
a long time. You can register adapters and views (which, of course
are adapters) for classes as well
Martin Aspeli wrote:
Chris Withers wrote:
I find myself often having to define pure marker interfaces for each
class that I define, purely so I can register adapters for objects of
that class.
Why does your class not have a (non-marker) interface in the first place?
The use of interfaces as
Chris Withers wrote:
Jim Fulton wrote:
adapter
for=.myclasses.MyClass
provides=.interfaces.ISomething
factory=.adapters.MyAdapter
/
I think it is a fine idea. That's why it has been supported for
a long time. You can register adapters and views (which, of course
are
Christian Theune wrote:
originally we intended to do a Zope 3.3.1 release in November to get
virtually bug free.
I didn't see any momentum on this. How about a bug day?
I'm supposed to be the release manager for this too. I was hoping
someone else would volunteer but of course I already
Christian Theune wrote:
Shane Hathaway wrote:
I'm working on enhancing zope.app.apidoc, but I ran into an exception
that's hard to decipher. I've attached the traceback. I don't know
which __init__() it's complaining about, and I don't know how to find
out. What can I do to find out which
Chris Withers wrote:
Jim Fulton wrote:
adapter
for=.myclasses.MyClass
provides=.interfaces.ISomething
factory=.adapters.MyAdapter
/
I think it is a fine idea. That's why it has been supported for
a long time. You can register adapters and views (which, of course
are
On Thursday 09 November 2006 10:02, Chris Withers wrote:
...will work, right?
import zope.component
class A(object):
... pass
...
class B(A):
... pass
...
import zope.interface
class ISomething(zope.interface.Interface):
... pass
...
class BToSomething(object):
... def
Lennart Regebro wrote:
On 11/9/06, Chris Withers [EMAIL PROTECTED] wrote:
Why do you say extra ZCML registration? You need that ZCML
registration whether or not you have to write the marker interface...
Sure, but with the marker interface you need only one. You need one
for each class, in
Shane Hathaway wrote:
Christian Theune wrote:
Shane Hathaway wrote:
I'm working on enhancing zope.app.apidoc, but I ran into an exception
that's hard to decipher. I've attached the traceback. I don't know
which __init__() it's complaining about, and I don't know how to find
out. What
Hi,
I'll be around at PyCon 2007 and I plan to have a Zope 3.4 sprint there.
I've added a wiki page to the PyCon 2007 wiki and everybody is invited
to join me:
http://us.pycon.org/TX2007/Zope34Sprint
Cheers,
Christian
--
gocept gmbh co. kg - forsterstraße 29 - 06112 halle/saale - germany
Jean-Marc Orliaguet wrote:
And there is nothing wrong with using inheritance when there is a '__IS
A __' type of relation (e.g. an ordered folder IS A folder IS AN item,
...), or if there is a HAS_A type of relation (a folder has items, a
chair has four legs...). It seems that Zope3 has
Christian Theune wrote:
Shane Hathaway wrote:
Unfortunately, the adapter hook is in C. It would be great if I could
switch it to Python. Is that possible?
I remember being able to step into it. pdb then put me into the next
Python-level within there ...
Probably you can delete some
OT: Thunderbird makes a real mess of interpreter examples, thinking the
'' is an indent and making it a coloured line. Anyone got an idea how I
stop it from doing that?
Martin
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub:
Martin Aspeli wrote at 2006-11-9 04:37 -0800:
...
Why does your class not have a (non-marker) interface in the first place?
The use of interfaces as documentation and as formalisms for expressing a
class' functionality (in adapters, utilities etc) is one of the benefits
that Zope 3 introduces. I
Martin Aspeli wrote:
OT: Thunderbird makes a real mess of interpreter examples, thinking the
'' is an indent and making it a coloured line. Anyone got an idea how I
stop it from doing that?
If you find out, PLEASE tell me too. :-)
Shane
___
Shane Hathaway wrote:
Martin Aspeli wrote:
OT: Thunderbird makes a real mess of interpreter examples, thinking the
'' is an indent and making it a coloured line. Anyone got an idea how I
stop it from doing that?
If you find out, PLEASE tell me too. :-)
I think this might help you:
Christian Theune wrote:
Shane Hathaway wrote:
Martin Aspeli wrote:
OT: Thunderbird makes a real mess of interpreter examples, thinking the
'' is an indent and making it a coloured line. Anyone got an idea how I
stop it from doing that?
If you find out, PLEASE tell me too. :-)
I think
Shane Hathaway wrote:
Christian Theune wrote:
Shane Hathaway wrote:
Martin Aspeli wrote:
OT: Thunderbird makes a real mess of interpreter examples, thinking the
'' is an indent and making it a coloured line. Anyone got an idea how I
stop it from doing that?
If you find out, PLEASE tell me
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Shane Hathaway wrote:
Martin Aspeli wrote:
OT: Thunderbird makes a real mess of interpreter examples, thinking the
'' is an indent and making it a coloured line. Anyone got an idea how I
stop it from doing that?
If you find out, PLEASE tell me
Hi!
I plan to do some bugfixing in zope.formlib and zope.app.form. This is
what I'd like to fix first:
The HTML label tag is not used correctly with items widgets. The result
is invalid HTML. This is how a MultiCheckBoxWidget is basically rendered::
label
Hello Shane,
SH For me, the value is in the comfort of a transparent database. I want
SH to know exactly what Zope is storing. FileStorage makes that fairly hard.
There is half-baked solution at z3c.zodbbrowser.
Without knowing your exact requirements, I suggest you take a look.
--
Best
29 matches
Mail list logo