Attribute loading

Hi,

Is there a way to obtain the resource when an attribute is unpickled?
(The resource that it belongs to?). The problem that I have is that,
in the changes that I'm making to SSIResource, I need to have access
to the CommandRegistry in order to unpickle the segments. And the only
way to get the command registry is to ask the resource for it. The
other thing that complicates matters here is that the only way that
the SSIResource can get the command registry is by getting the
registryClass attribute, so this seems sort of a circular thing. (At
attribute load time, I need access to the command registry, but this
needs a different attribute to be loaded).

Before, the registry didn't have a say in the binary format of the
segments, so this wasn't a problem, but this is about hte efficiency
changes that I wanted to make.

It seems to me that it's not possible... The alternative would be to
unpickle the segments to a temporary representation, and wait for the
first access to have the command registry decode them, but that would
be inefficient.


Has anyone had this kind of problem with attribute loading? (Lack of
necessary information at attribute unpickle time). Any work-arounds?

Thanks,

Antonio

--
======================================================================
Antonio Ramirez / 450 Memorial Dr. / Cambridge, MA 02139
anto@mit.edu, anto@w3.org

Received on Wednesday, 27 November 1996 14:38:40 UTC