• 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: Creating a managed object without adding it to the context?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Creating a managed object without adding it to the context?


  • Subject: RE: Creating a managed object without adding it to the context?
  • From: Ulai Beekam <email@hidden>
  • Date: Mon, 26 Jan 2009 12:21:28 +0000
  • Importance: Normal

>> My problem is that when I add directly to the managed object
>> context, the item is not getting selected automatically in the array
>> controller (by the way, I see the selection visually by means of the
>> table view bound to the array controller) even if I have checked the
>> "select on insert" checkbox on the array controller in Interface
>> Builder.
>
> IIRC that happens when you insert the object directly into the managed
> object context without going through the array controller.
>
> I.e. by using NSManagedObject's
>
> -initWithEntity:insertIntoManagedObjectContext:
>
> instead of NSArrayController's
>
> -addObject:

This is actually what I'm most interested about, and the reason why I asked my question in the first place. Can someone else here confirm this? Let me repeat what is to be confirmed: When a new managed object is added to the managed object context (NB: Directly going through to the context and NOT using arrayController's add: methods), is it true that the arrayController will not select that particular object?

If this is true, it seems strange to me, as this new object will get propagated to the arrayController and hence the arrayController should detect that it is a newly added object and therefore select it automatically, right?

Remember that throughout this discussion we assume that the "select on insert" checkbox is checked for the arrayController.


_________________________________________________________________
More than messages–check out the rest of the Windows Live™.
http://www.microsoft.com/windows/windowslive/_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Creating a managed object without adding it to the context?
      • From: "Sean McBride" <email@hidden>
References: 
 >Creating a managed object without adding it to the context? (From: Ulai Beekam <email@hidden>)
 >Re: Creating a managed object without adding it to the context? (From: Jerry Krinock <email@hidden>)
 >RE: Creating a managed object without adding it to the context? (From: Ulai Beekam <email@hidden>)
 >Re: Creating a managed object without adding it to the context? (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Re: How to catch and log EXC_BAD_ACCESS?
  • Next by Date: Full screen on a display other than the main display
  • Previous by thread: Re: Creating a managed object without adding it to the context?
  • Next by thread: Re: Creating a managed object without adding it to the context?
  • Index(es):
    • Date
    • Thread