Re:Duplicate Attributes

Alexandre Rafalovitch writes:
 > 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.

Some of these things have been fixed in the forthcomming release, not
all of them, though.

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

Agree 100% I'll try to tackle that one (I remember this was already
discussed, one of the problem is that the place where you get most
error context - ie the static block - dopesn't have enough Jigsaw
context toproperly report the error)

Anselm.

Received on Thursday, 6 February 1997 17:55:43 UTC