So why doesn't Java client let me empty a to-many
So why doesn't Java client let me empty a to-many
- Subject: So why doesn't Java client let me empty a to-many
- From: "Pierre Bernard" <email@hidden>
- Date: Wed, 19 Mar 2003 18:03:10 +0100
- Thread-topic: Newbie: NonDirect Java - Using Popup Menus in Nib Files
Hi!
The following way to emty a to-many leads to a ClassCastException (no stack trace) at save time when used on the Java client side:
selectedObject.setLignesFormules(NSArray.EmptyArray);
Thus the workaround:
while (selectedObject.lignesFormules().count() > 0)
{
NSMutableArray lignes = selectedObject.lignesFormules().mutableClone();
lignes.removeAllObjects();
selectedObject.setLignesFormules(lignes);
}
This is supposed to work with WebObjects 5.2, isn't it?
Pierre.
**********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender
of this message. (email@hidden)
This email message has been checked for the presence of computer
viruses; however this protection does not ensure this message is
virus free.
Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
**********************************************************************
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.