Re: [Zope-dev] bad bare except in PageTemplateFile.py

2002-07-18 Thread Steve Alexander
Shane Hathaway wrote: os.stat() raises OSError if the file is not found, in which case mtime should be set to 0. Surely if the file is not found, that's an error because the PageTemplateFile is pointing at a source file that doesn't exist. I cannot think of any reason I'd want not to be

Re: [Zope-dev] Re: Zope 2.4.3 patched Python 2.1.3 @ FreeBSD crashing

2002-07-18 Thread Myroslav Opyr
Jens Vagelpohl wrote: this will probably not help with zope 2.4.3 since that has other crash-bugs not covered by the python patch. upgrade to 2.4.4 or 2.5.1 instead. Thanks. This time upgrade to 2.4.4 appears to be successfull. What was that? Are there any Zope/Python tracker issues

[Zope-dev] Leak in 2.5.1 cAccessControl.c !?

2002-07-18 Thread Stefan H. Holek
Hi All! I believe I have found a leak in cAccessControl.c of Zope 2.5.1. See the patch below. It was difficult to spot because in the respective section of cAccessControl.c the 'owner' variable is reused several times. Note that 'ASSIGN' decrefs 'owner' before actually assigning, whereas the

Re: [Zope-dev] bad bare except in PageTemplateFile.py

2002-07-18 Thread Steve Alexander
Shane Hathaway wrote: I vaguely recall having a similar discussion with someone regarding DTMLFile, and we decided it had to ignore missing files, but I don't remember why. Darn... that'll be just the reason I'm looking for! Also, the open() call just below that line will raise an

[Zope-dev] Zope+java applet

2002-07-18 Thread Juliette Colmant
Hi, I wanted to know if it was possible to call a java applet with Zope? What kind of object do I have to use? When shall I put the file of my java Applet? Does someone have a little example? Thanks, Juliette. ___ Do You Yahoo!? -- Une

Re: [Zope-dev] bad bare except in PageTemplateFile.py

2002-07-18 Thread Casey Duncan
My guess would be that it would get an OSError possible IndexError, but I'm not sure the logic in just setting the mtime to null and continuing. especially since it will likely just try and fail to open the file a few lines later... This could actually be simplified to: try: mtime =

Re: [Zope-dev] bad bare except in PageTemplateFile.py

2002-07-18 Thread Shane Hathaway
Steve Alexander wrote: Shane Hathaway wrote: os.stat() raises OSError if the file is not found, in which case mtime should be set to 0. Surely if the file is not found, that's an error because the PageTemplateFile is pointing at a source file that doesn't exist. I cannot think of

Re: [Zope-dev] Nesting Forms

2002-07-18 Thread Casey Duncan
One approach might be to create a generic dtml (or zpt) template that has several placeholders (in the form of dtml-var or tal:replace) for the areas of the form that will vary. Then each subclass can override what goes in these placeholders if it chooses. Something like: class

[Zope-dev] add new base classes dynamically with hotfixes

2002-07-18 Thread Yuppie
Hi! I want to modify existing Zope classes without touching the code of the product packages. This how-to seems to fit exactly my needs: http://www.zope.org/Members/Caseman/Dynamic_Hotfix But one thing I don't know how to do: 1. Add new base classes to existing classes, such as CatalogAware

Re: [Zope-dev] Nesting Forms

2002-07-18 Thread Casey Duncan
On Thursday 18 July 2002 02:06 pm, Ross Boylan wrote: Is there a way to get inheritance, so that, for example, class C(B): sect1 = DTMLFile(CSect2,globals())+B.sect1(self)? I don't think that syntax will work, but perhaps you see what I'm driving at--I want to include all the

Re: [Zope-dev] Confusing segfault for Zope2 head on RH7.3

2002-07-18 Thread Dieter Maurer
Barry A. Warsaw writes: At the PyErr_SetString() call PyExc_IndexError is a perfectly valid PyObject*, but just one stack frame later, inside the PyErr_SetString, the exception object is a completely bogus address. PyErr_SetString() is not getting the same object that

Re: [Zope-dev] Nesting Forms

2002-07-18 Thread Dieter Maurer
Ross Boylan writes: ... I would prefer a more elegant approach. Perhaps I can define some method in A that the dtml will reference, and then B can override the method to add some extra stuff (the method would return a DTML snippet). That sounds good. It is how the ZMI works...

Re: [Zope-dev] Confusing segfault for Zope2 head on RH7.3

2002-07-18 Thread Barry A. Warsaw
DM == Dieter Maurer [EMAIL PROTECTED] writes: DM This looks like a compiler error, maybe an error in the DM dynamic linking code. Matt Kromer spent some more time on this today and indeed he suspected ld.so (specifically /lib/ld-2.2.5.so). This makes perfect sense and Matt's analysis

Re: [Zope-dev] bad bare except in PageTemplateFile.py

2002-07-18 Thread Shane Hathaway
Steve Alexander wrote: lib/python/Products/PageTemplateFile.py, line 110, method _cook_check try:mtime=os.stat(self.filename)[8] except: mtime=0 I've just spent an hour or so tracking down an awkward bug in some unit-tests. The true error was being hidden by this

Re: [Zope-dev] Nesting Forms

2002-07-18 Thread Ross Boylan
On Thu, Jul 18, 2002 at 02:18:43PM -0400, Casey Duncan wrote: On Thursday 18 July 2002 02:06 pm, Ross Boylan wrote: Is there a way to get inheritance, so that, for example, class C(B): sect1 = DTMLFile(CSect2,globals())+B.sect1(self)? I don't think that syntax will work, but

[Zope-dev] adding custom products programmatically

2002-07-18 Thread Kaimar Karu
Hi, I created a new Product, GalahadFile and in it I created several Z Classes, GalahadImageFile for example. Now if i want to use python script to add a GalahadImageFile programmatically - what should I do? I add Image files this way:

Re: [Zope-dev] Nesting Forms

2002-07-18 Thread Ross Boylan
On Thu, Jul 18, 2002 at 08:41:02PM +0200, Dieter Maurer wrote: Ross Boylan writes: ... I would prefer a more elegant approach. Perhaps I can define some method in A that the dtml will reference, and then B can override the method to add some extra stuff (the method would return a