Re: [Zope-dev] updateObjectList for objectManagers?
On 4/30/02 10:59 AM, "Lennart Regebro" <[EMAIL PROTECTED]> wrote: > From: "Jeffrey P Shell" <[EMAIL PROTECTED]> >> Basically, if you don't trust _objects, how do you get the list of actual >> subobjects? > > abel deuring suggested that I would check for a meta_tag attribute on the > attributes. That might work I guess? Just be sure to avoid accidental acquisition of the folder's meta_type via Acquisition.aq_base(attr). -- Jeffrey P Shell www.cuemedia.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] updateObjectList for objectManagers?
From: "Jeffrey P Shell" <[EMAIL PROTECTED]> > Basically, if you don't trust _objects, how do you get the list of actual > subobjects? abel deuring suggested that I would check for a meta_tag attribute on the attributes. That might work I guess? ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] updateObjectList for objectManagers?
On 4/30/02 8:27 AM, "Lennart Regebro" <[EMAIL PROTECTED]> wrote: > I have had a couple of problems with an object managers self._objects > getting out of sync with "reality", so that it keeps the wrong names or the > wrong meta_types in the _objects list. > Is there an "update" function that you could call to make it scrap this list > and rebuild it? I've never seen this problem. ObjectManager works best when you use its API's (_setObject/_setOb, _getOb). Since normal ObjectManager instances store subobjects as attributes, it would take some trickery to decide what was a subobject, and what was just an attribute. If you're not careful, you could end up with an even worse list in _objects. That being said, I imagine it wouldn't be *too* difficult to implement something like this. However, since (in theory) an ObjectManager subclass can change the behavior of the core _getOb/_setOb/_delOb methods to store subobjects in a different fashion, you'd have to take this into account. Basically, if you don't trust _objects, how do you get the list of actual subobjects? -- Jeffrey P Shell www.cuemedia.com ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
[Zope-dev] updateObjectList for objectManagers?
I have had a couple of problems with an object managers self._objects getting out of sync with "reality", so that it keeps the wrong names or the wrong meta_types in the _objects list. Is there an "update" function that you could call to make it scrap this list and rebuild it? It would be nice I think... ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )