Re: [Zope-dev] Accessing root object
Robert Sander <zope-dev@beteigeuze.cs.tu-berlin.de> wrote:
On Thu, Feb 10, 2000 at 03:40:38PM -0000, Phil Harris wrote:
I think there's something called app?
It's declared in <zopedir>/lib/python/Main.py.
That may be what your looking for??
I don't know, the object app is not in the global namespace when __init__.py of my Product is called.
It may be the same problem with the discussed scheduler product when creating another thread, b ut I don't know.
Here is a snippet from the ZopeStudio product, which munges the top-level application object (actually, its *class*) to add the RDF stuff that the Mozilla front end uses:: # Shove the above method in the Application class OFS.Application.Application.zsTreeRoot = zsTreeRoot You should be able to do the same:: OFS.Application.Application.theORB = CORBA.orb_init( sys.argv ) # or whatever -- ========================================================= Tres Seaver tseaver@palladion.com 713-523-6582 Palladion Software http://www.palladion.com
On Thu, Feb 10, 2000 at 05:57:37PM -0600, Tres Seaver wrote:
You should be able to do the same::
OFS.Application.Application.theORB = CORBA.orb_init( sys.argv ) # or whatever
Hm, that does not work. I fI do this in the __init__.py of my product, my entire ZOPE system is not working any more. Should the object be pickable? Or should that only be done when instantiating an object from my product? Greetings -- Robert Sander www.gurubert.de
participants (2)
-
Robert Sander -
Tres Seaver