From: "Tom Deprez" <tom.deprez@uz.kuleuven.ac.be> To: <zope@zope.org> Sent: Thursday, April 04, 2002 4:18 PM Subject: [Zope] HTMLWithImages.py
Hi,
I'm looking at the HTMLWithImages.py file in the StructuredText folder. Now, in the document method, I can see
if hasattr(doc, 'key'):
Now, I know what this code means, but I do not know how to put 'key' in the structured text so that it will be used by the parser... Anybody an idea?
The code checks that the object "doc" has an attribute "key". How to make that object have that key depends entirely upon what that object is. Since you don't tell us, it's impossible to know, unless you have intimate knowledge of the python file in question, but some guesse can be made: 1. Either the object "doc" is an object in the Zope database. In that case it may be a property manager, and then you can set a property. 2. Or that object is something else completely, and then the attribute "key" must be set somewhere in the python code. In short: This is a classic sample of asking the wrong question. Nobody can tell you how to do something, unless you tell them what it is you are trying to do. So: What are you trying to accomplish?