I am not the most experienced person at this so perhaps someone else will offer better advice.
As far as I know you need to ensure two things.
1) that the property form can actually find the dtml list. i.e. the right path/namespace
2) that the list is actually a list, by this I mean a python
list of the form ['item','item2']
I must say I have had trouble in the past getting dtml documents to return true lists.
Unless you really need to use a dtml document/method, it may be easier to use a 'lines' property in the same property sheet or the property sheet of and object in its parent path. Then create a 'select' property and set it's value to the name of the 'lines' property. I hope this makes sense.
I have also found it easier to return a list from a python script.
A python script containing:
return ['item','anotheritem']
usually works too.
Tom
=> -----Original Message-----
=> From: Chris Bruce [mailto:chrisabruce@yahoo.com]
=> Sent: Friday, 20 July 2001 3:52 PM
=> To: tomc@evetcia.com
=> Cc: zope@zope.org
=> Subject: RE: [Zope] ZClass Slection Property Question
=>
=>
=> That did not seem to work.
=>
=>
=> --- tomc@evetcia.com wrote:
=> > The DTML method (in this case 'encoding') must return a
=> list. I have
=> > had
=> > trouble doing this before.
=> >
=> > From my experience this will not work:
=> >
=> > <dtml-return "['list', 'of', 'objects']">
=> >
=> > because this seems to return a string that looks like a
=> list, but not
=> > a true
=> > list.
=> >
=> > I found the only way I could do this was:
=> >
=> > <dtml-call "REQUEST.set('list',[])">
=> > <dtml-call "list.append('values')">
=> > ...
=> > <dtml-return list>
=> >
=> > Tom
=> >
=> >
=> >
=> > => -----Original Message-----
=> > => From: zope-admin@zope.org [mailto:zope-admin@zope.org]On
=> > => Behalf Of Chris
=> > => Bruce
=> > => Sent: Friday, 20 July 2001 1:02 PM
=> > => To: zope@zope.org
=> > => Subject: [Zope] ZClass Slection Property Question
=> > =>
=> > =>
=> > => I have added a Selection property to a ZClass. But I can't
=> > => figure out
=> > => how to get the values to display. I inserted "encoding" as the
=> > value
=> > => and added a DTML Method called "encoding". Inside the dtml
=> > method, I
=> > => have:
=> > =>
=> > => HTML
=> > => Plain Text
=> > =>
=> > => But when I view the propertysheet, it says:
=> > =>
=> > => No value for encoding.
=> > =>
=> > =>
=> > => Any ideas on what I am doing wrong? Additionally, is
=> there a way
=> > to
=> > => populate a drop down box with a list of strings in a
=> dtml method?
=> > =>
=> > =>
=> > => Thanks,
=> > =>
=> > =>
=> > => Chris
=> > =>
=> > => __________________________________________________
=> > => Do You Yahoo!?
=> > => Get personalized email addresses from Yahoo! Mail
=> > => http://personal.mail.yahoo.com/
=> > =>
=> > => _______________________________________________
=> > => 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 )
=> > =>
=> >
=>
=>
=> __________________________________________________
=> Do You Yahoo!?
=> Get personalized email addresses from Yahoo! Mail
=> http://personal.mail.yahoo.com/
=>