• 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: refreshing and relationships
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: refreshing and relationships


  • Subject: Re: refreshing and relationships
  • From: Tom Woteki <email@hidden>
  • Date: Sun, 15 Jan 2006 14:15:09 -0500

I don't think I should have to do this. But to your point, I am trying to get a "fresh array". What I want, and expected, is that any invocation of "targets()" subsequent to deleting a target object should deliver that fresh array. What I don't understand is why it isn't happening the way I expect.

Thanks
Tom


On Jan 15, 2006, at 12:52 PM, Dev WO wrote:

I think the deleted object is still in there because you have an NSArray and not a NSMutable one, so even if you delete the object in the editing context, as long as you are not requesting a new NSArray, you'll get the "original" array and not an "editing context fresh" one.


I'm not sure, but someone will probably say if I'm wrong, I would create an NSMutableArray (called mutableTargets for example) and do:

mutableTargets.removeObject(aSpecificTargetObject); //This to update the NSMutableArray and so the list displayed in your component

editingContext.deleteObject(aSpecificTargetObject); //To update the editing context so everything will be saved correctly when you'll saveChanges()


 _______________________________________________
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

References: 
 >refreshing and relationships (From: Tom Woteki <email@hidden>)
 >Re: refreshing and relationships (From: Dev WO <email@hidden>)

  • Prev by Date: Re: refreshing and relationships
  • Next by Date: Re: refreshing and relationships
  • Previous by thread: Re: refreshing and relationships
  • Next by thread: Re: refreshing and relationships
  • Index(es):
    • Date
    • Thread