Wrox Programmer Forums

Need to download code?

View our list of code downloads.

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 Display Modes
  #11 (permalink)  
Old December 18th, 2011, 09:11 PM
Friend of Wrox
Points: 1,671, Level: 16
Points: 1,671, Level: 16 Points: 1,671, Level: 16 Points: 1,671, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
ipadhelper@me.com
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)
  #12 (permalink)  
Old December 19th, 2011, 03:28 AM
Registered User
Points: 28, Level: 1
Points: 28, Level: 1 Points: 28, Level: 1 Points: 28, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
  #13 (permalink)  
Old December 20th, 2011, 06:44 AM
Registered User
Points: 28, Level: 1
Points: 28, Level: 1 Points: 28, Level: 1 Points: 28, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
  #14 (permalink)  
Old March 3rd, 2012, 11:17 AM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
  #15 (permalink)  
Old March 3rd, 2012, 12:35 PM
Friend of Wrox
Points: 1,671, Level: 16
Points: 1,671, Level: 16 Points: 1,671, Level: 16 Points: 1,671, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
Default

Send an email to
ipadhelper@me.com
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
  #16 (permalink)  
Old March 3rd, 2012, 09:04 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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!
  #17 (permalink)  
Old March 3rd, 2012, 10:46 PM
Friend of Wrox
Points: 1,671, Level: 16
Points: 1,671, Level: 16 Points: 1,671, Level: 16 Points: 1,671, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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)
  #18 (permalink)  
Old March 4th, 2012, 08:02 AM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
  #19 (permalink)  
Old April 24th, 2012, 11:34 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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
  #20 (permalink)  
Old April 25th, 2012, 08:31 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
 


Thread Tools
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
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



All times are GMT -4. The time now is 04:38 PM.


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