Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Professional iPhone and iPad Database Application Programming
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional iPhone and iPad Database Application Programming
This is the forum to discuss the Wrox book Professional iPhone and iPad Database Application Programming by Patrick Alessi; ISBN: 978-0-470-63617-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional iPhone and iPad Database Application Programming section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 24th, 2011, 07:25 PM
Registered User
 
Join Date: Apr 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 6 Task - Core Data setup won't run

When I complete the Core Data model at the end of Chapter 6 it compiles but if I try to run the app on the iPhone simulator I get an error and the app won't run.

Should the app be capable of running at that point?

The error I get is:

Code:
[Session started at 2011-04-24 17:15:56 -0600.]
2011-04-24 17:15:57.206 Tasks[822:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'executeFetchRequest:error: A fetch request must have an entity.'
*** Call stack at first throw:
(
	0   CoreFoundation                      0x00fa15a9 __exceptionPreprocess + 185
	1   libobjc.A.dylib                     0x010f5313 objc_exception_throw + 44
	2   CoreData                            0x00ccd05a -[NSManagedObjectContext executeFetchRequest:error:] + 3930
	3   CoreData                            0x00db08d0 -[NSFetchedResultsController performFetch:] + 1440
	4   Tasks                               0x0000336a -[RootViewController fetchedResultsController] + 739
	5   Tasks                               0x00002e01 -[RootViewController numberOfSectionsInTableView:] + 36
	6   UIKit                               0x004756ff -[UITableViewRowData(UITableViewRowDataPrivate) _updateNumSections] + 111
	7   UIKit                               0x004753b0 -[UITableViewRowData invalidateAllSections] + 66
	8   UIKit                               0x0032cd23 -[UITableView(_UITableViewPrivate) _updateRowData] + 113
	9   UIKit                               0x0032848f -[UITableView numberOfSections] + 39
	10  UIKit                               0x004c4165 -[UITableViewController viewWillAppear:] + 100
	11  Tasks                               0x00002b00 -[RootViewController viewWillAppear:] + 67
	12  UIKit                               0x003789be -[UINavigationController _startTransition:fromViewController:toViewController:] + 858
	13  UIKit                               0x0037332a -[UINavigationController _startDeferredTransitionIfNeeded] + 266
	14  UIKit                               0x0048e2e9 -[UILayoutContainerView layoutSubviews] + 226
	15  QuartzCore                          0x01f41a5a -[CALayer layoutSublayers] + 181
	16  QuartzCore                          0x01f43ddc CALayerLayoutIfNeeded + 220
	17  QuartzCore                          0x01ee90b4 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
	18  QuartzCore                          0x01eea294 _ZN2CA11Transaction6commitEv + 292
	19  UIKit                               0x002bc9c9 -[UIApplication _reportAppLaunchFinished] + 39
	20  UIKit                               0x002bce83 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 690
	21  UIKit                               0x002c7617 -[UIApplication handleEvent:withNewEvent:] + 1533
	22  UIKit                               0x002bfabf -[UIApplication sendEvent:] + 71
	23  UIKit                               0x002c4f2e _UIApplicationHandleEvent + 7576
	24  GraphicsServices                    0x018f9992 PurpleEventCallback + 1550
	25  CoreFoundation                      0x00f82944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
	26  CoreFoundation                      0x00ee2cf7 __CFRunLoopDoSource1 + 215
	27  CoreFoundation                      0x00edff83 __CFRunLoopRun + 979
	28  CoreFoundation                      0x00edf840 CFRunLoopRunSpecific + 208
	29  CoreFoundation                      0x00edf761 CFRunLoopRunInMode + 97
	30  UIKit                               0x002bc7d2 -[UIApplication _run] + 623
	31  UIKit                               0x002c8c93 UIApplicationMain + 1160
	32  Tasks                               0x00002164 main + 102
	33  Tasks                               0x000020f5 start + 53
	34  ???                                 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'
  #2 (permalink)  
Old April 24th, 2011, 07:34 PM
Registered User
 
Join Date: Apr 2011
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I figured it out - seems that the code in the RootViewController is expecting the "default" entity and not the model we created in Chapter 6. There were several methods in the controller that called Entities or Attributes that did not exist because we had created the new model.

Would have been helpful for the book to tell us not to try to run the app at the end of Chapter 6.

--Michael
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Transaction in Transform Data Task - DTS mahesh_bote SQL Server DTS 0 October 21st, 2009 03:53 AM
Published Setup run on windows 2000 upadhyayharish83 .NET Framework 3.5 0 August 21st, 2008 02:01 AM
Run bat file as part of Setup project adorable.ashish General .NET 0 March 5th, 2008 07:42 AM
hide the task bar when program run anchal C# 2 July 28th, 2006 12:14 PM
Data Driven Query Task forkhead SQL Server DTS 1 June 22nd, 2006 11:01 AM



All times are GMT -4. The time now is 07:25 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.