• 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: Sharing instances between NIB's?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sharing instances between NIB's?


  • Subject: Re: Sharing instances between NIB's?
  • From: "Timothy Reaves" <email@hidden>
  • Date: Tue, 17 May 2005 14:34:34 -0400 (EDT)
  • Importance: Normal

>
> On May 17, 2005, at 5:54 AM, Timothy Reaves wrote:
>
>
>>      I have an app I'm working on that uses CoreData and has
>> multiple NIB
>> files.  The other NIB's have sheets used to edit a particular object
>> type each.  What is the best way - if there is a 'best'- to share
>> instances of objects between these NIB's?
>>       In my case I not only have the managedObjectContext to share,
>> but
>> I'd also want to 'inject' the particular object instance into the
>> new NIB as the object to manage by the NSObjectController.
>>
>>
>
> In what way is this any different from "sharing" instances of any
> other sort of object between nibs?
>
> mmalc
>
>

     It is my understanding that if I simply drag the header of the object
to the NIB window, and instantiate it, that will instantiate a new
instance.  Whereas this isn't a concern from a resource utilization
standpoint, I'm not sure if it is the best from a design standpoint.
So I figured I'd ask people with more experience than I.

     So if I have a NIB with an ObjectController instance on it, what
method would I call to set the instance of the CoreData object it is
to control.

     Then, is it beast to put a new instance of my AppDeligate in the
subsequent NIBs, or create some other class that holds a reference to
the managedObjectContext.

     To date, when I've needed to share objects between NIBs, I've created
an AppController instance per NIB, then put outlets in the
AppController.  I then have one controller instantiate an other, and
set the outlet.  I'm wanting to get others opinion as to whether this
is the most effective way to do this.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Sharing instances between NIB's?
      • From: mmalcolm crawford <email@hidden>
  • Prev by Date: Re: Bindings and Quartz Composer
  • Next by Date: Re: A CoreData Limitation?
  • Previous by thread: Re: Sharing instances between NIB's?
  • Next by thread: Re: Sharing instances between NIB's?
  • Index(es):
    • Date
    • Thread