Previously Charlie Clark wrote: > > Am 30.10.2007 um 17:40 schrieb Wichert Akkerman: > > >__init__ is indeed the wrong place: when the instance is created it is > >not placed in an acquisition context yet. > > That would indeed explain things!!! Is it okay to call a method which > does this from __init__ ?
No, since the acquisition context is only created when the object is insert into the hierarchy somewhere (sloppy terminology here, I know). And that can only happen after the instance has been fully created. As an example: obj = Object() # obj has no acquisition context folder.obj = obj # folder.obj will have an acquisition context In other words: in __init__ and everything you call from __init__ the instance will not have an aq context. The context does not magically appear. Wichert. -- Wichert Akkerman <[EMAIL PROTECTED]> It is simple to make things. http://www.wiggy.net/ It is hard to make things simple. _______________________________________________ Zope-CMF maillist - Zope-CMF@lists.zope.org http://mail.zope.org/mailman/listinfo/zope-cmf See http://collector.zope.org/CMF for bug reports and feature requests