NSMutableSet, NSArray and WORepetition - Correct Usage
NSMutableSet, NSArray and WORepetition - Correct Usage
- Subject: NSMutableSet, NSArray and WORepetition - Correct Usage
- From: "Jonathan Fleming" <email@hidden>
- Date: Mon, 31 Jan 2005 15:49:34 +0000
I think I'm doing things on the flip side or I have a fried brain...
What is the best way to get a NSMutableSet back into an Array... Why?
because I can not use a NSMutableSet in a WORepitition which is calling for
a NSArray but more importanly I don't want duplicates in the NSArray.
Or should I be filtering this someother way? Suggustions / examples welcome
please. Thanks
this is the code i'm using:
EOFetchSpecification boundFs = new
EOFetchSpecification("TbEcmOrder", qualifier, sortOrderings);
EOEditingContext myEC = this.session().defaultEditingContext();
queryResultsOrders = myEC.objectsWithFetchSpecification(boundFs);
queryResultsOrders_distinct = new NSArray (new
NSMutableSet(queryResultsOrders));
System.out.println( "===\r NSArray queryResultsOrders_distinct:
\r" + queryResultsOrders_distinct);
this is the Error:
Exception occurred while handling request:
java.lang.IllegalArgumentException: While trying to set the field
"tbEcmOrder_distinct" on an object of type Ecm_OrderPaymentStatus we
expected a TbEcmOrder but received a com.webobjects.foundation.NSMutableSet
with a value of ({values = {...found results... }; this = "<TbEcmOrder
21447f _EOIntegralKeyGlobalID[TbEcmOrder (java.lang.Integer)7]>"; }). This
often happens if you forget to use a formatter.
I don't understand since I have made this into an NSArray, I belief, but it
still seeing a NSMutableSet
Regards
Jonathan :^)
Ummm... Don't blame me, blame my training... ;^)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden