What does the "Precondition" property of the file class refer to? Roché
On Fri, 4 Aug 2000, RC Compaan wrote:
What does the "Precondition" property of the file class refer to?
As far as I can tell from a quick scan of the source, the precondition is an object that is called just before the file object is rendered. It can raise an exception, in which case the object will not get rendered. I could swear I read that documented somewhere, but I can't find it. Someone should submit a doc patch for the API help pane. I'd do it, but I haven't gotten around to learning how the help system works yet so I don't know what file to patch <grin>. --RDM
On Fri, Aug 04, 2000 at 10:11:55PM -0400, R. David Murray wrote:
On Fri, 4 Aug 2000, RC Compaan wrote:
What does the "Precondition" property of the file class refer to?
As far as I can tell from a quick scan of the source, the precondition is an object that is called just before the file object is rendered. It can raise an exception, in which case the object will not get rendered. I could swear I read that documented somewhere, but I can't find it. Someone should submit a doc patch for the API help pane. I'd do it, but I haven't gotten around to learning how the help system works yet so I don't know what file to patch <grin>.
Precondition Allows you to specify a precondition for the File. A precondition is a method or document which is executed before the File is viewed or downloaded. If the precondition raises an exception then the File cannot be viewed. This is from the Help page presented when you click the 'help' button on the 'Edit' tab of a 'File' object. -- Martijn Pieters | Software Engineer mailto:mj@digicool.com | Digital Creations http://www.digicool.com/ | Creators of Zope http://www.zope.org/ | ZopeStudio: http://www.zope.org/Products/ZopeStudio -----------------------------------------------------
On Sun, 6 Aug 2000, Martijn Pieters wrote:
Precondition
Allows you to specify a precondition for the File. A precondition is a method or document which is executed before the File is viewed or downloaded. If the precondition raises an exception then the File cannot be viewed.
This is from the Help page presented when you click the 'help' button on the 'Edit' tab of a 'File' object.
I knew I'd read it somewhere! First I ran through the help menu, but I must have looked at File/Image Add and missed File/Image Edit. Then I looked at an Image (I had no File objects handy), and when I saw that the help tab for the Edit, page had no description of precondition, and indeed that there was no way to set it, I figured the docs for it must only be in the API section. But the API section does not discuss *any* of the call paramters. So I thought it was undocumented. Since the code supports preconditions on an Image, is this an interface error or a design decision (the latter seems more likely)? If it's a design decision, shouldn't precondition still be documented in the Image api help doc? This is an example of a systematic problem with the (very useful <grin>) help docs as they stand: if the API docs implicitly assume that the parameters are documented in the corresponding management interface panel then there should at least by a cross link; and if there are sometimes parameters that are *not* documented on the manage page, then that needs to be taken into account somehow. --RDM
participants (3)
-
Martijn Pieters -
R. David Murray -
RC Compaan