[Zope] ZCatalog and dictionary python instances variables (QUEST)

Oscar Picasso picasso@videotron.ca
Wed, 05 Apr 2000 14:06:57 -0400


Hi,

I' trying to use ZCatalog to index some values stored in a dictionary. The
dictionary is an instance variable of a python class which is a base for a
ZClass.

**my python class**

class Multi:
	def set(self):
		self.a = 'The a attribute'
		self.b = {'one' : 'un', 'two': 'deux', 'three': 'trois'}

ZMulti is a ZClass derived from Multi, and multi is a ZMulti instance.

Before Cataloging my object I run:
<dtml-call "multi.set()">

Works fine:
<dtml-var a> returns 'The a attribute'
<dtml-var b> returns {'one' : 'un', 'two': 'deux', 'three': 'trois'}

If i try to catalog multi with the Find tab, it works fine index : a
but not for b.
I've tried index : b (type TextIndex)
           index : b (type FieldIndex)
           index : b['one'] (type TextIndex)
           index : b['one']  (type FieldIndex)

But it never works.

Any help greatly appreciated.