Re: "No Selection" in Core Data
Re: "No Selection" in Core Data
- Subject: Re: "No Selection" in Core Data
- From: J Tichenor <email@hidden>
- Date: Sat, 25 Jun 2005 12:43:26 -0700
I'm sure it has something to do with not properly instancing the
Budget Entity when the program launches -- I guess my assumption
as a programmer is that the Budget entity should automatically
instance when the program starts as it must exist
It's not clear what this means. If you haven't set default values
in the model, and you haven't done anything else to set property
values, then property values are nil or 0.
Well I have set default values, but that doesn't seem to create the
instance of Budget. It obviously makes more sense to me to set the
values as defaults in the model, as opposed to code...
-- but I don't know how to instance the Budget and where --
probably in AppDelegate, right? Maybe in managedObjectContext?
I've tried to find the spot but must admit the autogenerated code
doesn't necessarily make itself apparent...
To set up default values (that are not set in the model), use
awakeFromInsert:
<http://developer.apple.com/documentation/Cocoa/Reference/
CoreData_ObjC/Classes/NSManagedObject.html#//apple_ref/doc/uid/
TP30001171-BBCJFJFC>
<http://developer.apple.com/documentation/Cocoa/Conceptual/
CoreDataUtilityTutorial/06_RunClass/chapter_7_section_2.html>
Will look and see if these answer the questions. Again, would rather
do all I can in the model -- want to try and keep the code at a
minimum and take advantage of the free stuff from CD...
J
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40lehopictures.com
This email sent to email@hidden
_______________________________________________
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