W3C home > Mailing lists > Public > www-jigsaw@w3.org > November to December 1996

Attribute loading

From: Anselm Baird_Smith <abaird@www43.inria.fr>
Date: Tue, 3 Dec 1996 10:48:42 +0100 (MET)
Message-Id: <199612030948.KAA08529@www43.inria.fr>
To: Antonio Ramirez <anto@w3.org>
Cc: www-jigsaw@w3.org
Antonio Ramirez writes:
 > 
 > Hi,

Hi Anto,

Sorry for the delay...

 > 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).

One work-around is to override the pickle/unpickle methods of the
resource itself. But that's a tough decision (I am not sure I would
recommend this). On the other hand, attributes are meant to be
"resource-independent" by definition (and this might be important,
even though I am rather unsure), and your attributes are clearly not.

BTW: don't you have a pointer to the CommandRegistry in the segments ?
Couldn't you add one there ?

Anselm.
Received on Tuesday, 3 December 1996 04:48:33 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:25 GMT