Re: [Zope-dev] Re: [Zope] Optimization and speed

2000-07-17 Thread Toby Dickenson
On Sat, 15 Jul 2000 13:19:33 -0700, Stephan Richter <[EMAIL PROTECTED]> wrote: >I take that back in the previous mail to Steve about the large table. We >have one and I split the header from the rest as you suggested. But since >it is not streaming the information, it will still pop up all at o

[Zope-dev] Multi-homed objects?

2000-07-17 Thread Chris Withers
Is there any reason why an object cannot be contained in more than one Folder in the ZODB? Apparently what I'm talking about is very similar to hard linking in UNIX... I can't think of any reasons why this would be bad but I can't think how to implement an 'Add hard link to this object' function

[Zope-dev] Acquisition/cDocumentTemplate bug

2000-07-17 Thread Dieter Maurer
Recently, several posters have reported strange "AttributeError __call__" exceptions. The most precise was a report by Oleg Broytmann: /index_html DTML Document /standard_html_headerDTML Method /sub

Re: [Zope-dev] Optimization and speed

2000-07-17 Thread Dieter Maurer
Steve Alexander writes: > lib/python/ZPublisher/BaseResponse.py > > def write(self,data): > """\ > Return data as a stream > > HTML data may be returned using a stream-oriented interface. > This allows the browser to display partial results while >

Re: [Zope-dev] Multi-homed objects?

2000-07-17 Thread Oleg Broytmann
On Mon, 17 Jul 2000, Chris Withers wrote: > Is there any reason why an object cannot be contained in more than one > Folder in the ZODB? > > Apparently what I'm talking about is very similar to hard linking in > UNIX... Hardlinks are prohibited on directories; and 5 minutes ago you said all o

Re: [Zope-dev] Multi-homed objects?

2000-07-17 Thread Chris Withers
Oleg Broytmann wrote: >Hardlinks are prohibited on directories; and 5 minutes ago you said all > objects are foldersih :) I'm not sure if my statement applies in this situation... ;-) >Hardlinks are prohibited on directories because it'd cause infinite > loops on traversing. Hmm, would

[Zope-dev] ZPatterns: Coad "Object Models"

2000-07-17 Thread Steve Alexander
Hi Folks, After the ZPatterns chat on Friday, it looked like a few people were thinking of getting into Peter Coad's book "Object Models: Strategies, patterns and applications". I've just received my copy, and I'll be starting it later today. I intend to use a Wiki to record my observations a

Re: [Zope-dev] Acquisition/cDocumentTemplate bug

2000-07-17 Thread Shane Hathaway
Brian, This is an excellent bug analysis. I suggest that we create a new PyCallable_Check function that works in the presence of wrappers, perhaps called PyCallable_CheckW(). If it is placed in Acquisition.c then cDocumentTemplate.c will have to #include "Acquisition.h". Then we need to replac

Re: [Zope-dev] Multi-homed objects?

2000-07-17 Thread Shane Hathaway
Chris Withers wrote: > > Oleg Broytmann wrote: > >Hardlinks are prohibited on directories; and 5 minutes ago you said all > > objects are foldersih :) > > I'm not sure if my statement applies in this situation... ;-) > > >Hardlinks are prohibited on directories because it'd cause infini

Re: [Zope-dev] Multi-homed objects?

2000-07-17 Thread Chris Withers
Shane Hathaway wrote: > This could be part of a "visitor" interface I've been pondering in the > back of my mind. It would be capable of traversing, performing an > arbitrary function, and never falling into a recursive trap. Cool :-) Let me know when it's available :-) Can you see any weirdit

[Zope-dev] Wstring

2000-07-17 Thread Sin Hang Kin
hello : Does anyone known how to patch Zope2.2 for Wstring? Rgs, Kent Sin - kentsin.weblogs.com kentsin.imeme.net ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cr

Re: [Zope-dev] Multi-homed objects?

2000-07-17 Thread Shane Hathaway
Chris Withers wrote: > > Shane Hathaway wrote: > > This could be part of a "visitor" interface I've been pondering in the > > back of my mind. It would be capable of traversing, performing an > > arbitrary function, and never falling into a recursive trap. > > Cool :-) > > Let me know when it'

Re: [Zope-dev] Wstring

2000-07-17 Thread Toby Dickenson
On Mon, 17 Jul 2000 21:05:06 +0800, "Sin Hang Kin" <[EMAIL PROTECTED]> wrote: >hello : > >Does anyone known how to patch Zope2.2 for Wstring? If you mean my wstring patches that were developed for 2.1.6, you will find some updated patches at the original location, www.zope.org/Members/htrd/wstr

Re: [Zope-dev] Multi-homed objects?

2000-07-17 Thread Chris Withers
Shane Hathaway wrote: > > Can you see any weirdities that might occur from having an object as an > > attribute of more than one object manager / folder? > > The recursion problem, for one. Hmmm, how much of Zope would need changing to use the visitor interface? > Also, if you change the obje

Re: [Zope-dev] Multi-homed objects?

2000-07-17 Thread Oleg Broytmann
On Mon, 17 Jul 2000, Chris Withers wrote: > How does it work in Unix? (that seems to be a good baseline :-) On UNIX symlink is not a link - it is a text file, that contains a name of resource. The name could points to nowhere, or to resource, even to other symlink... Oleg.(All opi

RE: [Zope-dev] Question: circumventing the full fishbowl for small changes...?

2000-07-17 Thread Brian Lloyd
> I've reviewed the introduction to the fishbowl process > and its description of creating a project proposal wiki > document and such, and the full process a project should > take. However, I have 2 very small but useful additions > to Zope I wish to make. Both additions are already a

Re: [Zope-dev] Multi-homed objects?

2000-07-17 Thread Steve Alexander
Oleg Broytmann wrote: > > On Mon, 17 Jul 2000, Chris Withers wrote: > > How does it work in Unix? (that seems to be a good baseline :-) > >On UNIX symlink is not a link - it is a text file, that contains a name > of resource. The name could points to nowhere, or to resource, even to > other

[Zope-dev] 2.2 annoying nit

2000-07-17 Thread Martijn Faassen
Hi there, I see that the 2.2 still has this annoying, and seemingly completely unnecessary minor change in the tab order: Tabs for folder in 2.1: Contents View Properties Import/Export Security Undo Find Tabs for folder in 2.2: Contents Import/Export Properties View Find Security Undo Ownersh

[Zope-dev] The Application object

2000-07-17 Thread Jeff K. Hoffman
Hello, What is the easiest way for me to get ahold of the Application object at run-time? I am writing a Product that needs to access some things in the Control_Panel, and need the app object to get there. I know how to do it given a reference to an object in the ZODB (getPhysicalRoot(), etc.),

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, > > Wh

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 ha

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 fra

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 ro

RE: [Zope-dev] The Application object

2000-07-17 Thread Chris McDonough
So it's kosher then to reimport the Zope module and use app() in a constructor method, Shane? I was always afraid it would do something horrible. > -Original Message- > From: Jeff K. Hoffman [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 17, 2000 1:11 PM > To: Shane Hathaway > Cc: Chris

Re: [Zope-dev] The Application object

2000-07-17 Thread Shane Hathaway
Chris McDonough wrote: > > So it's kosher then to reimport the Zope module and use app() in a > constructor method, Shane? I was always afraid it would do something > horrible. You certainly should not call reload(Zope), but the semantics of import are smart enough to only execute the module th

Re: [Zope-dev] The Application object

2000-07-17 Thread Shane Hathaway
"Jeff K. Hoffman" wrote: > Do I need to commit or abort even if I don't make changes to the > application object? The only thing I need it for is to get to the > Control_Panel; I am instantiating ZClass instances in the constructor of a > Python class, i.e.: > > class MyClass: > > def __init__

Re: [Zope-dev] The Application object

2000-07-17 Thread Shane Hathaway
Chris McDonough wrote: > > So it's kosher then to reimport the Zope module and use app() in a > constructor method, Shane? I was always afraid it would do something > horrible. Now that I've read this again I realize what you're saying. You're right, what happens is you get two connections ass

Re: [Zope-dev] The Application object

2000-07-17 Thread Jeff K. Hoffman
On Mon, 17 Jul 2000, Shane Hathaway wrote: > "Jeff K. Hoffman" wrote: > > > Do I need to commit or abort even if I don't make changes to the > > application object? The only thing I need it for is to get to the > > Control_Panel; I am instantiating ZClass instances in the constructor of a > > Pyt

RE: [Zope-dev] The Application object

2000-07-17 Thread Chris McDonough
Jeff, what exactly do you need to do with setstate? can you provide an example? > -Original Message- > From: Jeff K. Hoffman [mailto:[EMAIL PROTECTED]] > Sent: Monday, July 17, 2000 1:49 PM > To: Shane Hathaway > Cc: Jeff K. Hoffman; Chris McDonough; [EMAIL PROTECTED] > Subject: Re: [Zop

Re: [Zope-dev] The Application object

2000-07-17 Thread Shane Hathaway
"Jeff K. Hoffman" wrote: > All of my efforts are progressing towards one goal: How do I upgrade > existing instances of a ZClass? Since I could find no __setstate__ method > for ZClasses, I re-wrote the containing class as a Python class and > figured I could leverage __setstate__ there, instantia

RE: [Zope-dev] The Application object

2000-07-17 Thread Jeff K. Hoffman
On Mon, 17 Jul 2000, Chris McDonough wrote: > Jeff, what exactly do you need to do with setstate? can you provide an > example? I am simply trying to "upgrade" a persistent instance of a Python class. For instance: class MyClass: def __init__(self, id, title=''): self.myAttr

RE: [Zope-dev] The Application object

2000-07-17 Thread Chris McDonough
How about a class attribute? class MyClass: myAttr2 = 'Default' def getMyAttr1(self): return self.myAttr1 def getMyAttr2(self): return self.myAttr2 If myAttr2 needs to be a ZClass instance, just grab it inside the class. > -Original Message- > From: Jeff K

RE: [Zope-dev] The Application object

2000-07-17 Thread Jeff K. Hoffman
On Mon, 17 Jul 2000, Chris McDonough wrote: > How about a class attribute? > > class MyClass: > > myAttr2 = 'Default' > > def getMyAttr1(self): > return self.myAttr1 > > def getMyAttr2(self): > return self.myAttr2 > > If myAttr2 needs to be a ZClass instance, just

[Zope-dev] Zope crashing on

2000-07-17 Thread Steve Alexander
Zope 2.1.6 I'm using a "walk the tree" method of updating instances of a Python class, using an external method. Is there any reason that the following excerpt from an external method would cause Zope to crash shortly after it's been run on all suitable objects? The crash happens when I try to se

Re: [Zope-dev] Zope crashing on

2000-07-17 Thread Shane Hathaway
Steve Alexander wrote: > > Zope 2.1.6 > > I'm using a "walk the tree" method of updating instances of a Python > class, using an external method. Is there any reason that the following > excerpt from an external method would cause Zope to crash shortly after > it's been run on all suitable objec

Re: [Zope-dev] Errors causing half rendered pages

2000-07-17 Thread Martijn Pieters
On Sun, Jul 16, 2000 at 10:38:41PM +0100, Chris Withers wrote: > Dieter Maurer wrote: > > I saw this only when buggy HTML was generated. > > When I viewed the HTML source my Netscape browser sometimes > > showed me blinking parts that located the errors. > > Nope, this was with IE... > > I viewe

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 Fo

Re: [Zope-dev] Errors causing half rendered pages

2000-07-17 Thread Chris Withers
Martijn Pieters wrote: > THis rings vague bells of IIS or some other proxy server or somthing > converting LF tp CRLF but not updating the Content-Length header, thus having > your browser drop part of the transmission. > > I could be talking absolute nonsense of course. To much work on ZopeStud

Re: [Zope-dev] Multi-homed objects?

2000-07-17 Thread Chris Withers
Terry Kerr wrote: > > Where would the object aquire its attributes from? Would it try one of its > folders, then the other? Which order would it choose? Now that's a very good question ;-) Probably from the folder you referenced it from and then normal acquisition from then on... cheers, Ch

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-dev] Re: [Zope] DTML?

2000-07-17 Thread Dieter Maurer
R. David Murray writes: > On Tue, 11 Jul 2000, Chris Withers wrote: > > Tino Wildenhain wrote: > > > I want that too. When we are over it, how about replacing (or at least > > > aliasing) > > > these - variables to _ ? sequence-item, sequence-index etc. comes to > > > mind. > > > > IF you

Re: [Zope-dev] CalendarTag fix for Zope 2.2

2000-07-17 Thread IbaƱez Palomar Juan David
Shane already told me about this bug, the latest release (0.9.17) is fixed. > > Here is a small patch to make the lovely calendar tag play nice with > DT_Util.namespace() in Zope 2.2: > > $ diff -c lib/python/Products/Calendar/CalendarTag.py \ > lib/python/Products/Calendar/CalendarTag.py.org