[Zope-CMF] Re: Move CMF collector to Launchpad (redux)

2007-10-30 Thread Philipp von Weitershausen
Charlie Clark wrote: Am 29.10.2007 um 21:17 schrieb Wichert Akkerman: It seems that the Launchpad database is not separated by product. I was just checking the bugs fixed in the latest relase of Zope and #2339 refers to something completely different related to Ubuntu. I would have expected bug

[Zope-CMF] Re: Accessing the "context"

2007-10-30 Thread Rob Miller
robert rottermann wrote: Charlie Clark schrieb: Dear all, a simple question with hopefully a simple answer! How do I access objects from an object's context or hierarchy? Specifically I'd like to be able to access a ZopeDA connection for a site. I if you know the id of the object you are loo

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread Charlie Clark
Am 30.10.2007 um 18:13 schrieb robert rottermann: there are two places where you can put your code, in both cases acquisition is fully functional. Thanks very much! Now hit an error that my database connection object can't be pickled but at least I can access it! :-D Charlie -- Charlie Cl

[Zope-CMF] Re: Accessing the "context"

2007-10-30 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wichert Akkerman wrote: > 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 inde

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread robert rottermann
Wichert Akkerman schrieb: > Previously Charlie Clark wrote: >> Am 30.10.2007 um 17:04 schrieb Andrew Sawyers: >> >>> If it's in a content type's class, why not: >>> id = getattr(self, 'da_id', None) >>> Just using self as the context should be fine. >>> -- that of course presumes that the type is w

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread Wichert Akkerman
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 fr

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread Charlie Clark
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__ ? def __init__(self, id):

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread Wichert Akkerman
Previously Charlie Clark wrote: > > Am 30.10.2007 um 17:04 schrieb Andrew Sawyers: > > >If it's in a content type's class, why not: > >id = getattr(self, 'da_id', None) > >Just using self as the context should be fine. > >-- that of course presumes that the type is wrapped properly when > >you

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread Charlie Clark
Am 30.10.2007 um 17:04 schrieb Andrew Sawyers: If it's in a content type's class, why not: id = getattr(self, 'da_id', None) Just using self as the context should be fine. -- that of course presumes that the type is wrapped properly when you call that within your method. mm, currently getti

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread Andrew Sawyers
Charlie Clark wrote: Am 30.10.2007 um 16:53 schrieb Wichert Akkerman: getattr(context, 'my_da_or_what_ever', None) works a bit better. Doesn't that only work within a PythonScript? I need access from within a content type, ie. real Python code? It's called acquisition and it works everywhe

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread Andrew Sawyers
Wichert Akkerman wrote: da = getattr('my_da_or_what_ever', context, None) getattr(context, 'my_da_or_what_ever', None) works a bit better. Note that getattr('foo', context, None) is wrong. Wichert has the correct syntax; I didn't even pay attention to the syntax originally. :) Do

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread Charlie Clark
Am 30.10.2007 um 16:53 schrieb Wichert Akkerman: getattr(context, 'my_da_or_what_ever', None) works a bit better. Doesn't that only work within a PythonScript? I need access from within a content type, ie. real Python code? It's called acquisition and it works everywhere. Try it. Yes, but

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread Andrew Sawyers
Wichert Akkerman wrote: Previously Charlie Clark wrote: Am 30.10.2007 um 16:19 schrieb robert rottermann: da = getattr('my_da_or_what_ever', context, None) getattr(context, 'my_da_or_what_ever', None) works a bit better. Doesn't that only work within a PythonScript? I need

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread Andrew Sawyers
Charlie Clark wrote: Am 30.10.2007 um 16:19 schrieb robert rottermann: da = getattr('my_da_or_what_ever', context, None) Doesn't that only work within a PythonScript? I need access from within a content type, ie. real Python code? That will work within your content class code as well. T

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread Wichert Akkerman
Previously Charlie Clark wrote: > > Am 30.10.2007 um 16:19 schrieb robert rottermann: > > > > >da = getattr('my_da_or_what_ever', context, None) getattr(context, 'my_da_or_what_ever', None) works a bit better. > Doesn't that only work within a PythonScript? I need access from > within a conte

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread Charlie Clark
Am 30.10.2007 um 16:19 schrieb robert rottermann: da = getattr('my_da_or_what_ever', context, None) Doesn't that only work within a PythonScript? I need access from within a content type, ie. real Python code? Charlie -- Charlie Clark Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-93

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread Charlie Clark
Am 30.10.2007 um 15:41 schrieb Andreas Jung: Dear all, a simple question with hopefully a simple answer! How do I access objects from an object's context or hierarchy? Acquisition? Traversal using restrictedTraverse()? Yes, but I'm not sure which. Say I have a DA, myDA, in my portal ro

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread robert rottermann
Charlie Clark schrieb: > Dear all, > > a simple question with hopefully a simple answer! How do I access > objects from an object's context or hierarchy? Specifically I'd like to > be able to access a ZopeDA connection for a site. I > if you know the id of the object you are looking for beforeha

Re: [Zope-CMF] Accessing the "context"

2007-10-30 Thread Andreas Jung
--On 30. Oktober 2007 14:46:44 +0100 Charlie Clark <[EMAIL PROTECTED]> wrote: Dear all, a simple question with hopefully a simple answer! How do I access objects from an object's context or hierarchy? Acquisition? Traversal using restrictedTraverse()? -aj pgpXFZBCguPi5.pgp Description:

[Zope-CMF] Accessing the "context"

2007-10-30 Thread Charlie Clark
Dear all, a simple question with hopefully a simple answer! How do I access objects from an object's context or hierarchy? Specifically I'd like to be able to access a ZopeDA connection for a site. Is it correct that I have to register this somewhere to be able to access it from a portal

[Zope-CMF] CMF Tests: 11 OK

2007-10-30 Thread CMF Tests Summarizer
Summary of messages to the cmf-tests list. Period Mon Oct 29 13:00:00 2007 UTC to Tue Oct 30 13:00:00 2007 UTC. There were 11 messages: 11 from CMF Unit Tests. Tests passed OK --- Subject: OK : CMF-1.5 Zope-2.7 Python-2.3.6 : Linux From: CMF Unit Tests Date: Mon Oct 29 22:20:40 EDT 2

Re: [Zope-CMF] Move CMF collector to Launchpad (redux)

2007-10-30 Thread Wichert Akkerman
Previously Charlie Clark wrote: > > Am 29.10.2007 um 21:17 schrieb Wichert Akkerman: > > >>It seems that the Launchpad database is not separated by product. I > >>was just checking the bugs fixed in the latest relase of Zope and > >>#2339 refers to something completely different related to Ubuntu

Re: [Zope-CMF] Move CMF collector to Launchpad (redux)

2007-10-30 Thread Charlie Clark
Am 29.10.2007 um 21:17 schrieb Wichert Akkerman: It seems that the Launchpad database is not separated by product. I was just checking the bugs fixed in the latest relase of Zope and #2339 refers to something completely different related to Ubuntu. I would have expected bugs from unrelated proj

[Zope-CMF] ZCML import/export step registration

2007-10-30 Thread Wichert Akkerman
I completed implementation of zcml-based import and export step registration on the wichert-zcml-steps branch. The syntax for import steps is this: and for export steps: steps registered using zcml are stored in a new registry. I added some utility methods to the setup tool that l

[Zope-CMF] CMF Collector: Open Issues

2007-10-30 Thread tseaver
The following supporters have open issues assigned to them in this collector (http://www.zope.org/Collectors/CMF). Assigned and Open tseaver - "CMF needs View-based TypeInformation", [Accepted] http://www.zope.org/Collectors/CMF/437 - "CachingPolicyManager awareness of File and