On 5/26/05, Jim Fulton <[EMAIL PROTECTED]> wrote:
> Given the applications above, I don't think that there's value in
> fine-grained modification events that justifies the complecity of
> proposals we've thought of so far.
I doubt the event system needs to be much more fine-grained. If you
want an event to tell you when a particular property value has
changed, it's easy enough to use a custom field that wraps set() and
spawns a custom change event, e.g:
def __init__(self, object, changed_field):
self.changed_field = changed_field
def set(self, object, value):
TextLine.set(self, object, value)
If you use this field type for all text properties you want searched,
your text index can simply ignore all change events beside the one(s)
you care about and *then* only act on the specific fields changed.
Other tools that depend on built-in change events should still work.
This approach has the advantage of providing events that are as
fine-grained as the developer wishes them to be and pushes
resposibility for managing any resulting complexity sqarely on the
developer's shoulders. I doubt that making Zope's built-in events
more complicated is the way to go.
FWIW, $.02, etc,
> Are there other applications for modification events that
> I haven't considered?
> Jim Fulton mailto:[EMAIL PROTECTED] Python Powered!
> CTO (540) 361-1714 http://www.python.org
> Zope Corporation http://www.zope.com http://www.zope.org
> Zope3-dev mailing list
Zope3-dev mailing list