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

Re:Duplicate Attributes

From: Alexandre Rafalovitch <alex@access.com.au>
Date: Fri, 7 Feb 1997 09:13:54 +1000
Message-Id: <v03010d01af20135d8a9f@[203.18.229.116]>
To: www-jigsaw@w3.org
At 2:15 AM +1000 7/2/97, Anselm Baird_Smith wrote:
>Joel Crisp writes:
> > Hi
> >
> > In converting one class inheritance to another, I accidentally
> > duplicated an attribute.
> >
> > To my suprise, this caused the GenericResourceEditor to die nastily when
> > trying to edit the attributes of the form.
> >
> > Maybe Jigsaw should trap for this ?
>
>Indeed, I will put that in the todo list (it will probably throw some
>sub-class of RuntimeException at ergisterAttribute time)
>
>Anselm.


I believe this is more generic problem that this. There are several points
when resource is first loaded into memory and register all its fields.
IMHO, if there are any problems, Jigsaw should recover from it by catching
the exception and (probably) removing the offending resource. Otherwise, it
can corrupt DB and what not.

A good example would be adding a resource in the editor that has wrong full
name in 'Class.forName(bla)' part of static initialization. That causes the
JIgsaw die (partially) with (I believe) inconsistant saved state.
Unfortunately, I have done it nearly every time I create a resource on the
base of somebody else's code.

This issue is partly a requirement of a good user/programmer oriented
design and also is a VERY important security issue.

Regards,
     Alex.
Ps. Not trying to offend anybody, but to increase the loyal user base,
Jigsaw has to become foolproof.....

alex@access.com.au
Received on Thursday, 6 February 1997 17:48:06 GMT

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