Re: CoreData Question

2014-06-03 Thread William Squires
On Jun 2, 2014, at 8:38 PM, Laurent Daudelin wrote: > I have what I think is a simple CoreData question. > > Suppose I have an Employee table and a City table, a little bit like the > CoreData documentation. Each employee resides in a city. > > Now, multiple employees can

Re: CoreData Question

2014-06-03 Thread Keary Suska
On Jun 2, 2014, at 7:38 PM, Laurent Daudelin wrote: > I have what I think is a simple CoreData question. > > Suppose I have an Employee table and a City table, a little bit like the > CoreData documentation. Each employee resides in a city. > > Now, multiple employees can

CoreData Question

2014-06-02 Thread Laurent Daudelin
I have what I think is a simple CoreData question. Suppose I have an Employee table and a City table, a little bit like the CoreData documentation. Each employee resides in a city. Now, multiple employees can reside in the same city. Suppose I fetch a certain number of employees, how do I find

Re: Another basic CoreData question

2010-07-09 Thread Jerry Krinock
On 2010 Jul 09, at 07:19, Keary Suska wrote: > On Jul 9, 2010, at 6:12 AM, Jerry Krinock wrote: > >> An interesting question is how this happens in the DepartmentAndEmployees >> sample code. When I create a document with an employee, save the file and >> dump it with sqlite3, it appears that

Re: Another basic CoreData question

2010-07-09 Thread Sean McBride
On Sat, 10 Jul 2010 05:22:46 +1200, gumbo...@mac.com said: >Thanks for the help guys. I have this working now, along with the double >items. Is there any way to avoid/workaround this problem. Or rather >another way to get a reference to the departments? The workaround is to not fetch in awakeFrom

Re: Another basic CoreData question

2010-07-09 Thread gumboots
Thanks for the help guys. I have this working now, along with the double items. Is there any way to avoid/workaround this problem. Or rather another way to get a reference to the departments? Cheers Rob On 10/07/2010, at 2:26 AM, Sean McBride wrote: > On Fri, 9 Jul 2010 05:12:10 -0700, Jerry K

Re: Another basic CoreData question

2010-07-09 Thread Sean McBride
On Fri, 9 Jul 2010 05:12:10 -0700, Jerry Krinock said: >>> Using the standard Employee/Department example, Whats the best way to >set a default department for an Employee? >>> So that every employee is created with a relationship to the >"mailRoom" department. >> >> Probably to add some custom cod

Re: Another basic CoreData question

2010-07-09 Thread Keary Suska
On Jul 9, 2010, at 6:12 AM, Jerry Krinock wrote: > An interesting question is how this happens in the DepartmentAndEmployees > sample code. When I create a document with an employee, save the file and > dump it with sqlite3, it appears that the Employee is related to the > Department. But I l

Re: Another basic CoreData question

2010-07-09 Thread Jerry Krinock
On 2010 Jul 08, at 19:28, Noah Desch wrote: > On Jul 8, 2010, at 7:33 PM, gumbo...@mac.com wrote: > >> Using the standard Employee/Department example, Whats the best way to set a >> default department for an Employee? >> So that every employee is created with a relationship to the "mailRoom" >

Re: Another basic CoreData question

2010-07-08 Thread Noah Desch
On Jul 8, 2010, at 7:33 PM, gumbo...@mac.com wrote: > Using the standard Employee/Department example, Whats the best way to set a > default department for an Employee? > So that every employee is created with a relationship to the "mailRoom" > department. Probably to add some custom code to

Another basic CoreData question

2010-07-08 Thread gumboots
Using the standard Employee/Department example, Whats the best way to set a default department for an Employee? So that every employee is created with a relationship to the "mailRoom" department. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-13 Thread vincent habchi
Le 12 avr. 2010 à 23:17, Quincey Morris a écrit : > I think I'm confused now about what scenario we are talking about. Are you > saying that the object you insert with [NSArrayController insertObject...] is > *not* a NSManagedObject, but is a proxy object that is linked to the > NSManagedObject

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-13 Thread vincent habchi
Le 12 avr. 2010 à 22:22, Kyle Sluder a écrit : > On Mon, Apr 12, 2010 at 12:12 PM, vincent habchi wrote: >> Besides, the proxy solution has one advantage: since the object in the >> NSArrayController reacts to actions performed on buttons linked to it, I >> think it is better to have code in th

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-12 Thread Quincey Morris
On Apr 12, 2010, at 12:12, vincent habchi wrote: > Sure, I could do that. In fact I have done it: This order is not a property > of the inserted object, but of one liked therewith. But tell me, would > drag-and-drop work by just rearranging an object ID? > > Besides, the proxy solution has one

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-12 Thread Kyle Sluder
On Mon, Apr 12, 2010 at 12:12 PM, vincent habchi wrote: > Besides, the proxy solution has one advantage: since the object in the > NSArrayController reacts to actions performed on buttons linked to it, I > think it is better to have code in the proxy object rather than on the > NSManaged one, t

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-12 Thread vincent habchi
Quincey, thanks a lot > Surely it would be more robust to make the order explicit in your data model > (with a transient property if the order really is transient) and let the > array controller keep the displayed content sorted according to that order? Sure, I could do that. In fact I have do

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-12 Thread Quincey Morris
On Apr 12, 2010, at 10:14, vincent wrote: > I did try to insert the moved object in another array *before* deleting and > reinserting it (and then deleting it from the other array). AFAIK, inserting > an object in a NSArray retains it. TO no avail. Ah, ok, sorry -- trying the easiest answer fir

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-12 Thread vincent habchi
Quincy, (sorry for the double answer) > This is likely NOT a Core Data question. Most likely you're not doing your > memory management quite correctly. Look here under the heading "Mutable > Arrays": > > > http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Collections/

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-12 Thread Quincey Morris
On Apr 12, 2010, at 08:15, vincent habchi wrote: > I'd like to change the place of a NSManagedObject stored in a > NSArrayController in entity mode (after a drag'n drop operation). I didn't > find any suitable primitive, so I decided to go something like > "removeAtSomeIndex" and then immediate

NSArrayController in entity mode and permutations (CoreData question)

2010-04-12 Thread vincent habchi
Hi again! I'd like to change the place of a NSManagedObject stored in a NSArrayController in entity mode (after a drag'n drop operation). I didn't find any suitable primitive, so I decided to go something like "removeAtSomeIndex" and then immediately after "insertAtSomeOtherIndex". However, it

Re: NSTreeController and CoreData question

2009-05-25 Thread Scott Andrew
Actually. That makes it alot simpler. There is some selection and addition logic but that should be simple enough.. Like i said i am just over thinking it. Scott Andrew On May 25, 2009, at 8:42 PM, Steve Steinitz wrote: Hi Scott On 25/5/09, cocoa-dev-requ...@lists.apple.com wrote: I am w

Re: NSTreeController and CoreData question

2009-05-25 Thread Steve Steinitz
Hi Scott On 25/5/09, cocoa-dev-requ...@lists.apple.com wrote: I am working on a CoreData project but want some advice on using an Outline View. My relationships are setup like so. They don't have a parent/child entry. The entries more match the read data. Project ... Tragets Sources

Re: NSTreeController and CoreData question

2009-05-25 Thread Scott Andrew
I want to hold my heirarchy... And references.. So i don't want to change. I am working on a node wrapper. Scott On May 25, 2009, at 11:28 AM, Shlok Datye wrote: I recently came across some nice sample code on how to use NSTreeController with Core Data. Here it is: http://espresso-served-

NSTreeController and CoreData question

2009-05-25 Thread Scott Andrew
I am working on a CoreData project but want some advice on using an Outline View. My relationships are setup like so. They don't have a parent/child entry. The entries more match the read data. Project // just a simple group node will say (targets/sources) in localized languges.

Re: NSCollectionView and CoreData question

2008-04-23 Thread Matthew Delves
On 23/04/2008, at 12:08 AM, I. Savant wrote: Having set the 'content' binding to the arrangedObjects key in IB didn't produce a result though doing it programmatically has. Not sure why this would be. It depends. Since you have provided neither the exact bindings settings you're using nor

Re: NSCollectionView and CoreData question

2008-04-22 Thread I. Savant
> Having set the 'content' binding to the arrangedObjects key in IB didn't > produce a result though doing it programmatically has. Not sure why this > would be. It depends. Since you have provided neither the exact bindings settings you're using nor the code you used to establish the binding m

Re: NSCollectionView and CoreData question

2008-04-22 Thread Matthew Delves
On 22/04/2008, at 9:13 PM, I. Savant wrote: What I currently have is a core data store that holds information I want to display in an NSCollectionView. What I'm wondering is whether there is a way to get this accomplished and if so how? Yes, as described in the NSCollectionView documentat

Re: NSCollectionView and CoreData question

2008-04-22 Thread I. Savant
What I currently have is a core data store that holds information I want to display in an NSCollectionView. What I'm wondering is whether there is a way to get this accomplished and if so how? Yes, as described in the NSCollectionView documentation and the Leopard release notes. Hint: "bi

NSCollectionView and CoreData question

2008-04-21 Thread Matthew Delves
Greetings, What I currently have is a core data store that holds information I want to display in an NSCollectionView. What I'm wondering is whether there is a way to get this accomplished and if so how? Any help is greatly appreciated. Thanks, Matthew Delves ___