• 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: Core Data & ManagedObjectContext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Core Data & ManagedObjectContext


  • Subject: Re: Core Data & ManagedObjectContext
  • From: William Turner <email@hidden>
  • Date: Wed, 23 Jan 2008 17:25:24 -0800

Hi Phil,

I'm not sure why you want a different context for each window. Each context is a separate "scratchpad" for the underlying data store - do you really *want* to perform edits in separate contexts? That often results in additional complexity merging changes, etc., between the contexts. If you just want to be able to access the store via more than one nib, you should be able to make the application delegate's context available to all of those nibs.

For your second question - when a text field is bound you can have it continuously update the model or only when editing ends. You can also implement validation methods in the model object. If you want to involve an action before the data is sent to the model, then bindings may not be your solution - you may want to implement that part of your app with target-action instead.

I'm not completely clear on either of your problems/goals - if the answers I gave aren't sufficient maybe you could describe what you want to do in greater detail.

Wil

On Jan 23, 2008, at 12:43 PM, Philip Bridson wrote:

Hi there,

If I create an managedObjectContext for each of my windows in an application, and pass in the persistent store co-ordinator for the application will this allow me to edit information in the store via separate nibs as at the moment it will only let me bind to the applications delegate. Also, if I bind an NSTextField to the NSArrayController, it automatically stores the information that is supplied, how can I pass the information to a method first,, say by clicking OK, BEFORE submitting the information to the NSArrayController?

Many Thanks,

Phil.
_______________________________________________

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

_______________________________________________

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: Core Data & ManagedObjectContext
      • From: Philip Bridson <email@hidden>
References: 
 >Core Data & ManagedObjectContext (From: Philip Bridson <email@hidden>)

  • Prev by Date: grid lines and strange drawing behavior
  • Next by Date: Re: Reading text attachments from pasteboard into NSTextView
  • Previous by thread: Core Data & ManagedObjectContext
  • Next by thread: Re: Core Data & ManagedObjectContext
  • Index(es):
    • Date
    • Thread