Hi
I have a class that extends 'Folder' and in this
class i have a property of type dictionary.
This dictionary has the following meaning: key =
property id, value = a value (string or whatever).
I want to use the catalog to index and search for
this kind of objects.
For each property I have an index in
catalog.
Let's say the dictionary is {'field1' : 'value of
field 1', 'field2': 'value of field2'}.
I also have 2 indexes named 'field1' and
'field2'.
The problem is that when the catalog tries to
catalog my object doesn't find the properties 'field1' and 'field2' for my
object !!!
So, I overwrite __getattr__ to tell it how to
handle these properties
def __getattr__(self, name):
if name=='field1':
return
self.dict['field1']
elif name=='field2':
return
self.dict['field2']
else:
-- How do I
tell him to execute the default ?????
I want to handle __getattr__ just for some special
attributtes names
10x
Dragos