• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSMutableSet, NSArray and WORepetition - Correct Usage - SOLVED
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMutableSet, NSArray and WORepetition - Correct Usage - SOLVED


  • Subject: Re: NSMutableSet, NSArray and WORepetition - Correct Usage - SOLVED
  • From: "Jonathan Fleming" <email@hidden>
  • Date: Mon, 31 Jan 2005 16:50:50 +0000

Thanks James,
I wasn't looking deep enough in the API, didn't see that method inherited from NSSet


Regards
Jonathan :^)

From: James Seigel <email@hidden>
To: "Jonathan Fleming" <email@hidden>
Subject: Re: NSMutableSet, NSArray and WORepetition - Correct Usage
Date: Mon, 31 Jan 2005 08:57:36 -0700

Jonathan.

You made an NSArray with one element in it: an NSMutableSet. You need to add the pieces from the set into the array.

Actually you can just ask the set for .allObjects().

Cheers
James.
On 31-Jan-05, at 8:49 AM, Jonathan Fleming wrote:

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:
email@hidden


This email sent to email@hidden



_______________________________________________
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


  • Prev by Date: Re: About Database Vender Independent for WebObjects.
  • Next by Date: Cloudscape/Derby and WebObjects
  • Previous by thread: Raw Rows versus EOs
  • Next by thread: Cloudscape/Derby and WebObjects
  • Index(es):
    • Date
    • Thread