[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Ganymede Dev] Sensitive Invid Field
|
>
>Well, it would have been helpful if you had actually included your
>finalizeSetValue() method, rather than just the secondary setDName()
>method.
>
there goes:
//set DName field if the Parent field was changed
if(field.getID() == PARENT){
//tell ganymede wizad is active, only parent and zone may activate this
wizard
DNameWizardEnabled=true;
//initialize wizard
return
((InvidDBField)getField(PARENT)).rescanThisField(setDName((String)getFieldValueLocal(ZONE)));
}
I've put an over-amount of rescanThisField's in my source, yes I know.
Cleaning up is what I reserve for later after I've made the mess.
>The problem is almost certainly that you are trying to use
>
> return ((InvidDBField)getField(PARENT)).rescanThisField(null);
>
>to get the value of the PARENT field.. I assume that's the field that
>your finalizeSetValue() method was called upon to trigger setDName()
>being called?
>
Thats completely right
>If you look at the method signature for DBEditObject.finalizeSetValue(),
>you'll see that it is defined as
>
> public ReturnVal finalizeSetValue(DBField field, Object value)
field is in this case PARENT, value doesn't matter because I want the
current value of ZONE, which is either something or null.
>
>in this case, value will be the new Invid to be set into that field.
>If you do a getFieldValue() or something like that on an
>InvidDBField() between the time that finalizeSetValue() is called and
>the time that finalizeSetValue() is returned, you'll always see the
>old value of the Invid field.
like I thought. So at
try{
parentDName =
((StringDBField)getFieldInTarget(PARENT,DNAME)).getValueString();
}
the current value isn't finalized yet. And so I read the previous value..
>
>The whole point of finalizeSetValue() and the other finalize methods
>is that if your finalize methods don't return a successful ReturnVal
>or null, the change that you are being notified for will not actually
>be performed.
>
>Does this make sense?
yes it does. But can I finalize this Invid manually? Or is there some other
way to retreive the object referenced to in the yet unfinalized Invid?
>
>| besides it's great you're alreadsy at your work!\
>
>I haven't left yet.. it's only 6pm here. ;-)
Die hard!
Regards,
Jan Bonne Aans
DTO, TU Delft
The Netherlands
_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.
http://join.msn.com/?page=features/virus
----------------------------------------------------------------------------
To make changes to your subscription to the Ganymede Dev mailing list, send
mail to majordomo@arlut.utexas.edu.
To unsubcribe, include the line
unsubscribe ganymede-dev
in the body of your mail message
Visit the Ganymede web page at http://www.arlut.utexas.edu/gash2
----------------------------------------------------------------------------