[Zope] Trouble accessing object properties
   
    Burchill, Scott B.
     
    sburch@ordway.org
       
    Fri, 29 Jun 2001 10:27:48 -0500
    
    
  
I am building a site which will display a list of job postings.  I have
created a product with a ZClass for these postings.  These objects have a
number of properties.  I have a folder into which I have placed a number of
these job posting objects.
I want to write code which changes flow and/or makes decisions based on the
values of the properties in each object.  I have written this code just to
test my ability to accomplish these tasks:
for object in context.objectValues('jobposting'):
    print "Job Posting is:", object.title_and_id()
    print "Properties are:"
    for prop in object.propertyMap():
        print "    id   :", prop['id'],
        print "    type :", prop['type'],
        print "    value:", str(object.getProperty(prop['id']))
return printed
Here's the result:
Job Posting is: Director of Educational Programming and Children's Festival
(ChildFestDirect) 
Properties are: 
    id   : title 
    type : string 
    value: 
Job Posting is: Director of Marketing and Sales (MrktgDirector) 
Properties are: 
    id   : title 
    type : string 
    value: 
Obviously, I am doing something wrong in attempting to access the properties
of these objects.  If anyone can see what I'm doing wrong I would really
appreciate some help.  Thanks much!
--
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
\:)>
 /:(>