[Zope] Trouble accessing object properties

Burchill, Scott B. sburch@ordway.org
Fri, 29 Jun 2001 14:01:14 -0500


Solved it myself.  The key, of course, was the ZClass and the fact that I am
working with a property sheet.  So, code changes as follows:

for object in context.objectValues('jobposting'):
    print "Job Posting is:", object.title_and_id()

>>  sheet = object.propertysheets.get('JobPosting_description')

    print "Properties are:"
    for prop in sheet.propertyMap():
                ^^^^^
        print "    id   :", prop['id'],
        print "    type :", prop['type'],
        print "    value:", sheet.getProperty(prop['id'])
                            ^^^^^
return printed

Sorry to have posted and wasted your time only to answer this myself.  Maybe
this will help someone in the future.

--
Scott B. Burchill
Ordway Center for the Performing Arts
345 Washington Street
St. Paul, MN  55102-1495

voice +1 (651) 282-3023
cell  +1 (651) 248-2713
pager +1 (612) 818-7600
fax   +1 (651) 224-5319
efax  +1 (508) 519-6133

http://www.ordway.org

\:)>
 /:(>