[Zope] zope-2.1.5 and zclass (again)

Jim Fulton jim@digicool.com
Mon, 20 Mar 2000 11:01:30 -0500


Jim Fulton wrote:
> 
(snip)
> 
> > but i
> > still can't get the answer for my 2nd Q. got traceback when i tried to add a
> > zclass instance.  here's the traceback
> >
> > Traceback (innermost last):
> >   File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 214, in publish_module
> >   File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 179, in publish
> >   File /usr/local/Zope/lib/python/Zope/__init__.py, line 202, in zpublisher_exception_hook
> >     (Object: RoleManager)
> >   File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 165, in publish
> >   File /usr/local/Zope/lib/python/ZPublisher/mapply.py, line 160, in mapply
> >     (Object: Artikel_add)
> >   File /usr/local/Zope/lib/python/ZPublisher/Publish.py, line 102, in call_object
> >     (Object: Artikel_add)
> >   File /usr/local/Zope/lib/python/OFS/DTMLMethod.py, line 150, in __call__
> >     (Object: Artikel_add)
> >   File /usr/local/Zope/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__
> >     (Object: Artikel_add)
> >   File /usr/local/Zope/lib/python/DocumentTemplate/DT_With.py, line 133, in render
> >     (Object: Artikel.createInObjectManager(REQUEST['id'], REQUEST))
> >   File /usr/local/Zope/lib/python/DocumentTemplate/DT_Util.py, line 335, in eval
> >     (Object: Artikel.createInObjectManager(REQUEST['id'], REQUEST))
> >     (Info: REQUEST)
> >   File <string>, line 0, in ?
> >   File /usr/local/Zope/lib/python/ZClasses/ZClass.py, line 461, in createInObjectManager
> >     (Object: Artikel)
> > AttributeError: _getOb
> 
> I'm not seeing this. What are you trying to add the ZClass to?
> Zope 2.1.5 has a fix to ZClasses that makes it work correctly
> with ObjectManagers, including ObjectManagers that don't use
> instance attributes to hold sub-objects.  All ObjectManagers should
> implement a method, _getOb, that is used to get an object from the object
> manager. If you are adding your instance to an object that is *not*
> an object manager, then the above error would be expected.


Please disregard this. I didn't perform the test correctly.
I now can reproduce this. Stay tuned.

Jim

--
Jim Fulton           mailto:jim@digicool.com   Python Powered!        
Technical Director   (888) 344-4332            http://www.python.org  
Digital Creations    http://www.digicool.com   http://www.zope.org    

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.