![]() | Best explain the purpose of the code |
|
30 Jan 2010, 17:46
Fernando López (6 posts) |
Hello, on page 9 you recommend to use the Core Data template. On pages 59, 62, 64 you are reproducing (more or less) what this Core Data template writes. On page 59 you add code to initialize the Regards: iFernando |
|
31 Jan 2010, 08:03
Marcus S. Zarra (239 posts) |
I would suggest downloading the sample code and comparing it. The Type example you referred to is an addition to the template and demonstrates one (of many) solution to pre-populating a database on initial creation. |
|
18 Feb 2010, 22:19
nahuel (1 post) |
Hi Marcus, I’m a bit puzzled as well by the code on page 59 used to pre-populate a database on initial creation. If I remove the code from your sample code the application behaves exactly the same (nothing breaks). I’m therefore a little bit puzzled about it’s use. Thanks for your help |
|
19 Feb 2010, 04:29
Marcus S. Zarra (239 posts) |
The code merely checks to see if the type table is populated, if it is not then it grabs the default data from the Info.plist and adds it to the table. If you remove it from the app then that table will not get pre-populated but it will still function properly. |
| You must be logged in to comment |

