W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 1997

Resource attributes in constructor

From: Anselm Baird_Smith <abaird@www43.inria.fr>
Date: Fri, 24 Jan 1997 08:42:12 +0100 (MET)
Message-Id: <199701240742.IAA26038@www43.inria.fr>
To: Scott Jewell <jewellsc@pop.mts.kpnw.org>
Cc: www-jigsaw@www10.w3.org
Scott Jewell writes:
 > Hi,
 > Hope this is an easy one for somebody out there.
 > I can't seem to access my resources attributes in the constructor for
 > the class.  When I do a getValue, nothing is returned?  I'm not getting
 > an IllegalAttributeException or anything, just no value.  When the same
 > call is placed in the get() method, the proper value is returned.
 > Any ideas on what I'm missing?

You can use attribute (get/set) until the resource has been
initialized. To hook on that initialize, you need to put the code you
have in the contructor into the initialize method:

public void initialize(Object values[]) {
// Your code here, can access attributes

Received on Friday, 24 January 1997 02:42:19 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:30 UTC