Re:Duplicate Attributes

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 UTC