Re: [Zope-dev] Calling Catalog from python script

2001-02-16 Thread R. David Murray
On Fri, 16 Feb 2001, Steve Alexander wrote: > > This is 2.3.0, I suppose I should try the new beta just for kicks... > > Yes, do try the new beta. If this is what I think it is, it is fixed in the latest > 2.3, as I submitted the patch that fixed it :-) > > Are your objects traversed to through

Re: [Zope-dev] Calling Catalog from python script

2001-02-16 Thread Steve Alexander
R. David Murray wrote: > > And the expedition was a qualified success. It turns out that > getObject has one of those nasty unadorned try: except: structures > in it. It was masking an authorization error. The auth error > is occuring in urestrictedTraverse, and the last lines of my traceback

Re: [Zope-dev] Calling Catalog from python script

2001-02-16 Thread R. David Murray
On Fri, 16 Feb 2001, R. David Murray wrote: > Howevever, I'm still getting 'None' as the result. If I print out, say, > catent.id, I see the correct ID for the object I'm trying to retrieve. > > It doesn't make sense that this is failing. I must be doing something > stupid but I still can't se

Re: [Zope-dev] Calling Catalog from python script

2001-02-16 Thread R. David Murray
On Wed, 14 Feb 2001, Steve Alexander wrote: > > "R. David Murray" wrote: > >> catent.getobject() > >> > >> That would seem to be a lot more OOish. > > In 2.3 you can call catent.getObject(). You can pass an optional REQUEST > in as an argument, to support lookup via resolve_url rather than

Re: [Zope-dev] Calling Catalog from python script

2001-02-15 Thread Erik Enge
[[EMAIL PROTECTED]] | Where did getobject come from? I know about Catalog.data, but I've never | seen a getobject() method... It's a method of the brain ;). If you have a data_record_id, you can use getobject() to retrieve the object it represents.

RE: [Zope-dev] Calling Catalog from python script

2001-02-14 Thread Randall F. Kern
What's wrong with AbstractCatalogBrain.getObject()? Doesn't that work? -Randy > -Original Message- > From: Casey Duncan [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 14, 2001 3:45 PM > To: R. David Murray; [EMAIL PROTECTED] > Subject: Re: [Zope-dev] Ca

Re: [Zope-dev] Calling Catalog from python script

2001-02-14 Thread Casey Duncan
"R. David Murray" wrote: > > I'll probably figure this out as soon as I post like last time, but I've > been staring at it and can't see my mistake. The following code returns > a list of None's: > > objs = [] > for catent in container.Catalog(context.REQUEST): > objs.append(container.Catalog

Re: [Zope-dev] Calling Catalog from python script

2001-02-14 Thread Steve Alexander
[EMAIL PROTECTED] wrote: > "R. David Murray" wrote: >> catent.getobject() >> >> That would seem to be a lot more OOish. In 2.3 you can call catent.getObject(). You can pass an optional REQUEST in as an argument, to support lookup via resolve_url rather than restrictedTraverse. -- Steve A

Re: [Zope-dev] Calling Catalog from python script

2001-02-14 Thread richard
"R. David Murray" wrote: > objs = [] > for catent in container.Catalog(context.REQUEST): > objs.append(container.Catalog.getobject(catent.data_record_id_)) > return objs > > I've checked, and catent is a mybrains instance and catent.data_record_id_ > has an increasing number as its value. So w