[Zope3-dev] Persistence?

Marcus J. Ertl marcus.ertl@larp-welt.de
08 Jun 2003 15:31:38 +0200


Hi again!

At trying to solve my problems with event registration, I had digged a
bit through the code of Zope3. What I found was in
zope/app/event/subs.py (starting at line 104)::

  subscribers = clean_self._registry.get(ev_type)
  if subscribers is None:
      subscribers = []
      clean_self._registry.register(ev_type, subscribers)
  subscribers.append((token, filter))

And in zope/interface/type.py (starting at line 48)::

  def register(self, interface, object):
      if interface is None or IInterface.isImplementedBy(interface):
          self._reg[interface] = object
      else:
          raise TypeError(
              "The interface argument must be an interface (or None)")

(I hope linebreak will leave it readable.)

I'm not sure, if subscribe.append(...) starts the persistence maschinery
of zope. I'm afraid it doesn't. This would explain my problem on
registering events. I don't know how to change it, if this is realy the
reason for some of the problems mentioned allready in an earlier mail.

Bye
   Marcus J. Ertl