Re: [Zope-dev] The Application object

2000-07-18 Thread Shane Hathaway
Yves-Eric Martin wrote: Shane Hathaway [EMAIL PROTECTED] wrote: You *must* remember to close the connection: app._p_jar.close() This is not mentionned in the above document, so I was doing without so far, and did not run into any problem. Now that I see it, I believe this is the

RE: [Zope-dev] The Application object

2000-07-17 Thread Chris McDonough
I'm not sure I understand. What is AppSingleton? What does the Instance() method do? -Original Message- From: Jeff K. Hoffman [mailto:[EMAIL PROTECTED]] Sent: Monday, July 17, 2000 11:54 AM To: [EMAIL PROTECTED] Subject: [Zope-dev] The Application object Hello, What is the

RE: [Zope-dev] The Application object

2000-07-17 Thread Jeff K. Hoffman
On Mon, 17 Jul 2000, Chris McDonough wrote: I'm not sure I understand. What is AppSingleton? What does the Instance() method do? Sorry I wasn't clear enough. The Singleton is a design pattern from the Gang of Four book that fits this situation well. It is a class that is meant to control

RE: [Zope-dev] The Application object

2000-07-17 Thread Chris McDonough
Sorry I wasn't clear enough. The Singleton is a design pattern from the Gang of Four book that fits this situation well. It is a class that is meant to control access to the one and only instance of a global variable. I was just using that as a frame of reference, though; Zope has no

Re: [Zope-dev] The Application object

2000-07-17 Thread Shane Hathaway
Chris McDonough wrote: Sorry I wasn't clear enough. The Singleton is a design pattern from the Gang of Four book that fits this situation well. It is a class that is meant to control access to the one and only instance of a global variable. I was just using that as a frame of

Re: [Zope-dev] The Application object

2000-07-17 Thread Jeff K. Hoffman
On Mon, 17 Jul 2000, Shane Hathaway wrote: The way to get the root application object is to open a connection to the ZODB and get the 'Application' object from the list of root objects. There is an easy shortcut: import Zope app = Zope.app() app now refers to a *copy* of the root

RE: [Zope-dev] The Application object

2000-07-17 Thread Chris McDonough
McDonough; 'Jeff K. Hoffman'; [EMAIL PROTECTED] Subject: Re: [Zope-dev] The Application object On Mon, 17 Jul 2000, Shane Hathaway wrote: The way to get the root application object is to open a connection to the ZODB and get the 'Application' object from the list of root objects

Re: [Zope-dev] The Application object

2000-07-17 Thread Martijn Pieters
On Mon, Jul 17, 2000 at 12:21:42PM -0400, Jeff K. Hoffman wrote: On Mon, 17 Jul 2000, Chris McDonough wrote: I'm not sure I understand. What is AppSingleton? What does the Instance() method do? Sorry I wasn't clear enough. The Singleton is a design pattern from the Gang of Four book

Re: [Zope-dev] The Application object

2000-07-17 Thread Yves-Eric Martin
On Mon, 17 Jul 2000 12:50:27 -0400 Shane Hathaway [EMAIL PROTECTED] wrote: import Zope app = Zope.app() get_transaction().commit() I am doing just that in the next version of zzLocale (Zope interface internationalization product) I was about to release. I figured it out from the "Zope