[ZPatterns] what I'm doing wrong? PlugIns bug?
Antonio Beamud Montero
[email protected]
25 Oct 2001 14:58:36 +0200
On Thu, 2001-10-25 at 13:21, Steve Alexander wrote:
> Juan David Ib=E1=F1ez Palomar wrote:
>=20
> >
> > Probably his class simply inherits from SimpleItem. The problem seems
> > to be that "self" is not an acquisition wrapper as it should.
>=20
>=20
> Perhpas Antonio is returning a subobject without wrapping it properly=20
> with __of__.
>=20
I think I have resolve the problem... I have I dictionary with
references to another plugins instances. When I try to return the list
to show the links to this objects in a web page, I tranform the
dictionary in a list:
def list(self, REQUEST=3DNone):
r =3D []
for i in self._confs.values():
self.r.append(i)
return r
Ok, all works ok during a moment, but later this crash... now I return
the list but with the object properly wrapped with __of__ (like Steve
said, thanks, Steve):
def list(self, REQUEST=3DNone):
r =3D []
for i in self._confs.values():
self.r.append(i.__of__(self))
return r
Eureka!!! Al works ok... yepppa, and now my question, why I need to wrap
again this objects?=20
P.D: Today I'm learning a lot about internals Zope... :-)
Thanks.