[Zope] ZClass question - array of arrays
Dianne Van Dulken
Dianne.VanDulken@team.ozemail.com.au
Mon, 16 Sep 2002 12:23:49 +1000
Hi,
I'm having a little bit of a problem working out what ZClass property I
should be setting. I want to record an array that can either contain
strings or more arrays.
eg:
It can be
['a', 'b', 'c']
or
['a', ['b', 'c'], 'd']
or
[['a','b'], ['c','d'], ['e','f']]
The problem is that I can't work out what property type I should be setting
this to be. I tried tokens, but tokens won't allow arrays to be saved, and
both lines and strings assume that there will be a string (obviously), which
means that I have to do a lot of splitting on [ and , before I can work with
the data. The whole idea of the property is that if there is a scalar in
position X, it shows the scalar, otherwise with an array, it shows a random
value from that array.
Is there an obvious type that I am missing?
Thanks
Dianne