Re: Core Data Question 1

2008-08-24 Thread Kyle Sluder
On Sun, Aug 24, 2008 at 6:05 PM, R T <[EMAIL PROTECTED]> wrote: > So I think that the NSManagedObjectContext *moc is the property of the > document that the sheet needs. How can amtSheetWindowController be > initialized with this property? How can I bind amtSheetTableController in the > XIB file

Re: Core Data Question 1

2008-08-24 Thread R T
On Aug 19, 2008, at 21:39, R T wrote: > I have a Core Data Document-based Application.a document window > with a tableview, a text view and a button. When the button is > selected, a number is read from the text field and that many > objects are programatically added to the tableview. T

Re: Core Data Question 1

2008-08-19 Thread Quincey Morris
On Aug 19, 2008, at 21:39, R T wrote: I have a Core Data Document-based Application.a document window with a tableview, a text view and a button. When the button is selected, a number is read from the text field and that many objects are programatically added to the tableview. Then a s

Re: Core Data question

2008-08-10 Thread Chris Hanson
On Aug 10, 2008, at 8:37 PM, Graham Perks wrote: On Aug 10, 2008, at 10:30 PM, Chris Hanson wrote: you should not need to do a thing to ensure that the other is set after doing the first. That's what marking relationships as inverses means; Core Data will set them for you automatically. T

Re: Core Data question

2008-08-10 Thread Graham Perks
On Aug 10, 2008, at 10:30 PM, Chris Hanson wrote: you should not need to do a thing to ensure that the other is set after doing the first. That's what marking relationships as inverses means; Core Data will set them for you automatically. Thanks for that Chris, I did not know that. Still, i

Re: Core Data question

2008-08-10 Thread Chris Hanson
On Aug 10, 2008, at 6:51 PM, Graham Perks wrote: I do this, where I have an EventImage that refers back to a main Event, "self" is the managed object for the Event, which is your Account: // create new EventImage, this would be akin to your Acco

Re: Core Data question

2008-08-10 Thread Sandro Noel
Graham. Wow, that worked ... Thank you so Much ! Sandro. On 10-Aug-08, at 9:51 PM, Graham Perks wrote: On Aug 10, 2008, at 8:39 PM, Sandro Noel wrote: So I think my question here, is, what should I use when inserting a detail object to properly set the relationship to Account. some exam

Re: Core Data question

2008-08-10 Thread Sandro Noel
Graham. Thank you for the code. so what I should do if I understand your code, is fetch my account's managed object, before i insert any details. Sandro. On 10-Aug-08, at 9:51 PM, Graham Perks wrote: On Aug 10, 2008, at 8:39 PM, Sandro Noel wrote: So I think my question here, is, what sho

Re: Core Data question

2008-08-10 Thread Graham Perks
One more thing, since you are getting traps on insert. If you have derived your own NSManagedObject subclass and are overriding awakeFromInsert:, check you are calling [super awakeFromInsert]... On Aug 10, 2008, at 8:39 PM, Sandro Noel wrote: So I think my question here, is, what should I use

Re: Core Data question

2008-08-10 Thread Graham Perks
On Aug 10, 2008, at 8:39 PM, Sandro Noel wrote: So I think my question here, is, what should I use when inserting a detail object to properly set the relationship to Account. some example on how I should approach the problem would be nice, or a step-by-step :D I do this, where I have an Eve

Re: Core Data question

2008-08-10 Thread mmalc crawford
On Aug 10, 2008, at 6:39 PM, Sandro Noel wrote: So I think my question here, is, what should I use when inserting a detail object to properly set the relationship to Account. some example on how I should approach the problem would be nice, or a step-by-step

Re: Core Data question

2008-08-10 Thread Sandro Noel
Greetings. I've read the documentation on core data over again, and I'm still confused about how to manipulate relationships. every time I try an insert/add and there is a relationship involved, the insert crashes. (programatically that is, bindings work just fine) maybe, the way I think it

Re: Core Data question

2008-08-08 Thread Sandro Noel
Chris, thank you! the database itself is designed as a relational database would be, it's quite large actually, I just posted here two tables to illustrate the problem. The software I am building is a personal one, to help me track my budget. the goal is to import my transactions at the end

Re: Core Data question

2008-08-08 Thread Sandro Noel
On 8-Aug-08, at 2:41 PM, Negm-Awad Amin wrote: You should name your entities in the singular, as if you were naming classes, and you should name the properties (attributes & relationships) of your entities starting with a lower-case letter as if you were naming the properties of a class. Th

Re: Core Data question

2008-08-08 Thread Negm-Awad Amin
Am Fr,08.08.2008 um 18:29 schrieb Chris Hanson: On Aug 6, 2008, at 12:31 PM, Sandro Noel wrote: I have entities like this. TransactionTypes Atributes : Name:String Relationships: Transaction Transactions Atributes: Amount:Double, Date:Date, Memo:String, Payee:String

Re: Core Data question

2008-08-08 Thread Chris Hanson
On Aug 6, 2008, at 12:31 PM, Sandro Noel wrote: I have entities like this. TransactionTypes Atributes : Name:String Relationships: Transaction Transactions Atributes: Amount:Double, Date:Date, Memo:String, Payee:String Relationships: TransactionType You should

Re: Core Data question

2008-08-07 Thread Sandro Noel
Quincey & Marco, Thank you guy's, Very helpful information! :) Sandro On 6-Aug-08, at 3:31 PM, Sandro Noel wrote: Greetings! :) I'm experimenting with core data, bindings work just fine, I love them and it's great and all. :) but I want to import a massive file into the database. so I'm

Re: Core Data question

2008-08-07 Thread Marco Masser
This may not be strictly related to your problem, but maybe it helps: Transactions Atributes: Amount:Double, Date:Date, Memo:String, Payee:String Relationships: TransactionType If these are the attributes of the entity you created in Xcode's editor and you can set the class o

Re: Core Data question

2008-08-06 Thread Quincey Morris
On Aug 6, 2008, at 12:31, Sandro Noel wrote: Now, when I try to set the value for the [date] or [Amount] or [TransactionType], of the ManagedObject, i get an error: *** -[NSCFString managedObjectContext]: unrecognized selector sent to instance 0xXeXX The only thing that really works fine

Re: Core data question in multiwindow doc app

2008-06-28 Thread Steven Hamilton
On 28/06/2008, at 2:41 PM, Chris Hanson wrote: On Jun 27, 2008, at 7:25 PM, Steven Hamilton wrote: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(buildSourceList) name:@"NSManagedObjectContextObjectsDidChangeNotification" object: [self.document managedObjectCo

Re: Core data question in multiwindow doc app

2008-06-27 Thread Chris Hanson
On Jun 27, 2008, at 7:25 PM, Steven Hamilton wrote: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(buildSourceList) name:@"NSManagedObjectContextObjectsDidChangeNotification" object: [self.document managedObjectContext]]; Notification names should always use the

Re: Core data question in multiwindow doc app

2008-06-27 Thread Steven Hamilton
On 28/06/2008, at 4:32 AM, Ben Trumbull wrote: When I add a new account entity my outlineview doesn't know. Should I be using a notification to find out when a new account entity is added. If so, which one? The easiest way to track insertions and deletions in the NSManagedObjectContext is t

re: Core data question in multiwindow doc app

2008-06-27 Thread Ben Trumbull
When I add a new account entity my outlineview doesn't know. Should I be using a notification to find out when a new account entity is added. If so, which one? The easiest way to track insertions and deletions in the NSManagedObjectContext is the notification NSManagedObjectContextObjectsDidCh