[Zope] Problem: Accessing ZClass propertysheet properties
Roger Lam
rogerlam@kingscyber.net
Thu, 17 May 2001 18:25:46 +0800
I followed an sample from "Chapter 12: Extending Zope" of Zope Book
however the following pythonscripts didn't work.
==================================================
## Script (Python) "isHungry"
##
"""
Returns true if the animal hasn't eaten in over 8 hours
"""
from DateTime import DateTime
if (DateTime().timeTime()
- self.last_meal_time.timeTime() > 60 * 60 * 8):
return 1
else:
return 0
==================================================
The problem: "self" not found!
I've tried "container", "context" and other possible mixes and still
don't have any clue to get it work.
Please help.
Thank you.
Roger.