• 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: Fun (or not) with NSArrayControllers and CoreData.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fun (or not) with NSArrayControllers and CoreData.


  • Subject: Re: Fun (or not) with NSArrayControllers and CoreData.
  • From: Daniel DeCovnick <email@hidden>
  • Date: Fri, 31 Jul 2009 12:39:12 -0700


On Jul 31, 2009, at 11:01 AM, Quincey Morris wrote:

On Jul 31, 2009, at 10:33, Daniel DeCovnick wrote:

What is selected in FolderTreeController's outline view? Your code above implies that you select a non-root folder prior to adding a new job (to the non-root folder). The "allDescendantsJobs" relationship only has something in it for a root folder. Are you selecting a root folder and seeing no jobs?

I'm selecting root folders, non-root folders, or leaf folders, and seeing no jobs in any of those cases. If I select a particular folder (of any depth in the tree), create a new Job, quit, unbind the content set, and build and run the program, the Job I created but couldn't see is present, with it's folder and rootFolder set correctly.


Additionally, the following code only prints the name of the the current folder:

id adj = [folder allDescendantsJobs];
NSLog(@"Current Folder: %@.\n",[folder name]);
for (id i in adj)
{
	NSLog(@"Job: %@\n", [i name]);
}

BUT,
id kids = [folder children];
NSLog(@"Current Folder: %@.\n",[folder name]);
for (id i in kids)
{
NSLog(@"Child: %@\n", [i name]);
}
Prints out all the folder's children just fine. Weirder,
id jobs = [folder jobs];
NSLog(@"Current Folder: %@.\n",[folder name]);
for (id i in jobs)
{
NSLog(@"Job: %@\n", [i name]);
}
Works as expected as well, printing out only the current folder's jobs. All of these were placed at the top of newJob: from my previous message. I've double-checked the model for typos or unselected inverses, and it all checks out. Are there issues with multiple relationships between the same entities?


-Daniel
_______________________________________________

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


References: 
 >Fun (or not) with NSArrayControllers and CoreData. (From: Daniel DeCovnick <email@hidden>)
 >Re: Fun (or not) with NSArrayControllers and CoreData. (From: Quincey Morris <email@hidden>)
 >Re: Fun (or not) with NSArrayControllers and CoreData. (From: Daniel DeCovnick <email@hidden>)
 >Re: Fun (or not) with NSArrayControllers and CoreData. (From: Quincey Morris <email@hidden>)
 >Re: Fun (or not) with NSArrayControllers and CoreData. (From: Daniel DeCovnick <email@hidden>)
 >Re: Fun (or not) with NSArrayControllers and CoreData. (From: Quincey Morris <email@hidden>)
 >Re: Fun (or not) with NSArrayControllers and CoreData. (From: Daniel DeCovnick <email@hidden>)
 >Re: Fun (or not) with NSArrayControllers and CoreData. (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Exception-like behavior in save panel used for file choose
  • Next by Date: Re: Hyperlinks in NSAttributedString?
  • Previous by thread: Re: Fun (or not) with NSArrayControllers and CoreData.
  • Next by thread: Re: Fun (or not) with NSArrayControllers and CoreData.
  • Index(es):
    • Date
    • Thread