• 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: Debugging NSWindowController and NSArrayController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging NSWindowController and NSArrayController


  • Subject: Re: Debugging NSWindowController and NSArrayController
  • From: Keary Suska <email@hidden>
  • Date: Wed, 11 Apr 2012 13:41:54 -0600

On Apr 11, 2012, at 11:49 AM, Rui Pacheco wrote:

> Prepares content is checked, Uses lazy fetching is not - setting it doesn't change anything. I called -fetch: on gdb and the result was nil. managedObjects returns an empty array.

Have you verified that the array controller is using the same MOC that you use in your -init and -windowDidLoad?

> On 11 April 2012 19:12, Keary Suska <email@hidden> wrote:
> On Apr 11, 2012, at 7:04 AM, Rui Pacheco wrote:
>
> > Hi,
> >
> > I have an NSWindowController that creates an instance of
> > NSManagedObjectContext. That window controller loads a NIB that has a table
> > populated by an NSArrayController bound to the MOC in the window
> > controller. This was done via Interface Builder. The array controller is
> > set to retrieve Entities of type X.
> >
> > On the init method of my window controller I add an object of type X to the
> > MOC and I can see it's there because I can fetch it on windowDidLoad but
> > for some reason the array controller on the NIB doesn't see any data. If I
> > fire up gdb and do *po [arrayController arrangedObjects]* I get an empty
> > array.
> >
> > Is there any other way of debugging this?
>
>
> Is "Prepares content" checked? Is "Uses lazy fetching" checked? Do you have a predicate specified, and does the object match the predicate? What happens when you tell the array controller to -fetch:?

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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: Debugging NSWindowController and NSArrayController
      • From: Rui Pacheco <email@hidden>
References: 
 >Debugging NSWindowController and NSArrayController (From: Rui Pacheco <email@hidden>)
 >Re: Debugging NSWindowController and NSArrayController (From: Keary Suska <email@hidden>)
 >Re: Debugging NSWindowController and NSArrayController (From: Rui Pacheco <email@hidden>)

  • Prev by Date: Cocoaheads Lake Forest CA meeting tonight
  • Next by Date: Re: Debugging NSWindowController and NSArrayController
  • Previous by thread: Re: Debugging NSWindowController and NSArrayController
  • Next by thread: Re: Debugging NSWindowController and NSArrayController
  • Index(es):
    • Date
    • Thread