Acquisition problem
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 I am a little bit confused as acquisition does not work as I expected it would. I have assigned a property named Zeilenfarbe (to the top level folder). Zeilenfarbe is used to set the background color of odd rows in tables. When I assign a property with the same name (and other content) to a subfolder the rows are colored with the color defined at top level. If I remove the property at top level I will get the expected row colors. So what is wrong here? TIA Andreas -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com> iQA/AwUBOQmJ2JrEH3uwEF1BEQLdFACcCsfdnnQkXTWo/LViY/F0pHUlHBUAoOTF 6+r3V4wjF7xrBedkWu+4Vwlc =mPc9 -----END PGP SIGNATURE----- ********************************************************************** This email message has been swept by MIMEsweeper for the presence of computer viruses. Francotyp-Postalia AG & Co.
Hi, We experienced a similar problem when trying to have standard_error_message send an email to a folder owner. The root folder had an error_to property of the overall webmaster, so no error messages would be missed, but folder owners were encouraged to add this property to their folders so they got emails about problems originating in their folders. The problem was, the webmaster was the only person who got the emails, even if the property was defined. Is this a problem showing through? If someone else can confirm this (and that we two are not mad ;-) then this should probably go in the collector :S We experienced this on Zope 2.1.4 cheers, Chris a.wacknitz@francotyp.com wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I am a little bit confused as acquisition does not work as I expected it would.
I have assigned a property named Zeilenfarbe (to the top level folder). Zeilenfarbe is used to set the background color of odd rows in tables. When I assign a property with the same name (and other content) to a subfolder the rows are colored with the color defined at top level. If I remove the property at top level I will get the expected row colors.
So what is wrong here?
TIA Andreas
-----BEGIN PGP SIGNATURE----- Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
iQA/AwUBOQmJ2JrEH3uwEF1BEQLdFACcCsfdnnQkXTWo/LViY/F0pHUlHBUAoOTF 6+r3V4wjF7xrBedkWu+4Vwlc =mPc9 -----END PGP SIGNATURE----- ********************************************************************** This email message has been swept by MIMEsweeper for the presence of computer viruses.
Francotyp-Postalia AG & Co.
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
I have assigned a property named Zeilenfarbe (to the top level folder). Zeilenfarbe is used to set the background color of odd rows in tables. When I assign a property with the same name (and other content) to a subfolder the rows are colored with the color defined at top level. If I remove the property at top level I will get the expected row colors.
Yeah, acquisition is a little tricky until you're used to it. Remember that it doesn't *just* traverse your URL. Let's say you've got the following: / /FolderA /FolderB The root folder and FolderA both have a property (with the same name). If you reference the property in "/" or "/FolderB", you'll get the root-level property as you'd expect, and if you reference it as "/FolderA", you'll get the one from FolderA. However, if you reference it from "/FolderA/FolderB", you'll get the root-level property, which I'm guessing is happening to you. How exactly are you getting at the property? What's your directory structure look like? Hope any of this helps, -CJ
Yeah, acquisition is a little tricky until you're used to it. Remember that it doesn't *just* traverse your URL. Let's say you've got the following:
/ /FolderA /FolderB
The root folder and FolderA both have a property (with the same name). If you reference the property in "/" or "/FolderB", you'll get the root-level property as you'd expect, and if you reference it as "/FolderA", you'll get the one from FolderA. However, if you reference it from "/FolderA/FolderB", you'll get the root-level property, which I'm guessing is happening to you.
How exactly are you getting at the property? What's your directory structure look like?
Right, we have: Root = ErrorsToProperty | + - standard_error_message | + - method2 | + - Folder = ErrorsToProperty | + - method | + - method1 Now if method generates an error, I guess standard_error_message gets called in the context of the root object, and so the root's ErrorsToProperty gets used. Hmmm, which raises two interesting questions, which might be the same, but probably aren't: 1. How can I make standard_error_message (in root) use the correct ErrorsToProperty? 2. In general, how can I make method2, called(and acquired) by method1, use a property of method1's container in preference to the same property of method2's container? (see the diagram above if your head hurts as much as mine does ;-) cheers, Chris
Root = ErrorsToProperty | + - standard_error_message | + - method2 | + - Folder = ErrorsToProperty | + - method | + - method1
I set up some directories exactly as you have them, and I get the behavior you'd expect: "/method2" -> Root's property "/Folder/method" -> Folder's Property "/Folder/method2" -> Folder's Property I can't reproduce what you're talking about. You mentioned you were on Zope 2.1.4, maybe you should try 2.1.6? -CJ
I set up some directories exactly as you have them, and I get the behavior you'd expect:
"/method2" -> Root's property "/Folder/method" -> Folder's Property "/Folder/method2" -> Folder's Property
I can't reproduce what you're talking about. You mentioned you were on Zope 2.1.4, maybe you should try 2.1.6?
Actually I tried my example on 2.1.4 and it worked too... How embarassing :S I think it must be related to standard_error_message then and that I can quite understand being more than a bit wierd ;-) I'll have to have a play in the future and let you know how I get on. Cheers for the help though, Chris
participants (3)
-
a.wacknitz@francotyp.com -
Chris Withers -
Christopher J. Kucera