Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 18th, 2011, 10:11 PM
Friend of Wrox
 
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
Default

Michael,
If you wish to have a copy of the project that I sent to "tecky10", send an email to
[email protected]
and I will reply with a .zip of the project.

Bob
The Following User Says Thank You to thepianoguy For This Useful Post:
IandiPhone (December 20th, 2011)
 
Old December 19th, 2011, 04:28 AM
Registered User
 
Join Date: Dec 2011
Posts: 8
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Dear Bob,

I would like a copy of the project which you have sent to "tecky10". I've sent you an e-mail.

Thank you and thanks in advance.
Best regards, Michael
 
Old December 20th, 2011, 07:44 AM
Registered User
 
Join Date: Dec 2011
Posts: 8
Thanks: 6
Thanked 0 Times in 0 Posts
Default

Thank you very much Bob,

that has helped me a lot.

Best regards, Michael
 
Old March 3rd, 2012, 12:17 PM
Registered User
 
Join Date: Mar 2012
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Bob,

I'd LOVE a copy of that too. Is that possible?

Thanks so very much.

pi
 
Old March 3rd, 2012, 01:35 PM
Friend of Wrox
 
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
Default

Send an email to
[email protected]
with your request and I will reply with the project as an attachment.
I will be away from my computer for the next 5 hours, so will not be able to respond immediately.

Bob
 
Old March 3rd, 2012, 10:04 PM
Registered User
 
Join Date: Mar 2012
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Bob,

Wow, you're pretty popular! I know you're going to send me the code of your fix, but I'm trying to understand this. As I'm doing the exercise in ch. 3 i'm converting it to xcode 4... BLINDLY... anyway I'm getting an abort when I execute the statement in the main routine:

return UIApplicationMain(argc, argv, nil, NSStringFromClass([SampleTableProjectAppDelegate class]));

this is what's in the error console:
2012-03-03 20:58:21.449 Catalog[49999:207] *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]'

I KNOW that it's reading the DB correctly because I put breakpoints in and saw the data in the array.

Any ideas of what might be the problem?

All help is appreciated. Thanks so much!
 
Old March 3rd, 2012, 11:46 PM
Friend of Wrox
 
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
Default

I am assuming that you are doing the first version of the Chapter 3 program, and that by "converting to Xcode 4" you mean to use automatic reference counting. Two options to handle the conversion:
1. Code the program as in the book without using ARC, so that it compiles and runs. Then turn on ARC and choose Edit>Refactor>Convert to Objective-C ARC… Save the changes and compare what is different. That in conjunction with the documentation and developer video should be helpful.
2. Send me your project and I will see where you went astray.

Bob
The Following User Says Thank You to thepianoguy For This Useful Post:
Piwacket (April 24th, 2012)
 
Old March 4th, 2012, 09:02 AM
Registered User
 
Join Date: Mar 2012
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Bob (isn't that a drinking game? lol)

Thanks for the tip. I will send you my code because I don't want to just solve my problems, I need to understand them, otherwise I'll just create them again.

And yes, by converting to xcode 4 I was speaking of the ARC thing.

I'll send my code from my email acct.

thanks again, Bob.
Pi
 
Old April 24th, 2012, 11:34 PM
Registered User
 
Join Date: Mar 2012
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi Bob, (I fear I may have availed myself of your generosity too much, I pray that is not the case)

I've got one last LARGE hurdle in converting your sample catalog app to my app.

the problem is I get a sigabrt when I type in the first letter of a search, in the search box.

It's bombing on the line:
Code:
 self.filteredAnswercards = [flattenedArray
                                filteredArrayUsingPredicate:predicate];
Now the BIG DIFFERENCE between your code and mine is that when I display the contents of self.filteredAnswercards prior to the offending line it shows the value as (null), but when I display self.filteredProducts (in your version) prior to that line it shows an empty array as follows:

"the value of self.filteredProducts =(
)"

An empty array, with the right paren landing on the next line -- and it spills to the next line no matter how short I make the preceeding text, so it's either white space and a new line or just a newline???

I define it just like you do in the RootViewController.h:

Code:
    NSArray *filteredAnswercards;
  
and 

@property (retain, nonatomic) NSArray *filteredAnswercards;
I searched both versions for the string filteredAnswercards or filteredProducts (depending on which version, obviously) and they are mentioned in the exact same places with the same syntax.

I AM STYMIED and DESPERATE!!! PLEASE grace me with your generosity one more time. And please, let me treat you to some Starbucks or something.

Thank you in advance.
Pi
 
Old April 25th, 2012, 08:31 PM
Registered User
 
Join Date: Mar 2012
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Message to all: I have found the solution with the help of several people. The problem I was having WAS with the predicate string.. .in it I spelled the field name incorrectly that I was filtering on. (one letter off... no error because it's really only a string) So, my warning to the noob world... beware the predicate!!! I don't know if this will help anyone, but, I hope it does.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Fix: Chapter 7 - Earthquake IllegalStateException Finalizing cursor juniper BOOK: Professional Android 2 Application Development 3 August 19th, 2011 03:25 AM
Chapter 4 - CakePHP Form ID Passing fix Akira71 BOOK: Building PHP Applications with Symfony, CakePHP, and Zend Framework 3 April 6th, 2011 07:40 AM
Fix Error sgafar ASP.NET 1.0 and 1.1 Basics 0 May 30th, 2007 10:22 AM
New Chapter 3 Fix .MAttButler BOOK: Professional Web Parts and Custom Controls ASP.NET ISBN: 0-7645-7860-X 0 August 14th, 2006 09:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.