Wrox Programmer Forums
|
BOOK: Beginning iOS Programming: Building and Deploying iOS Applications
This is the forum to discuss the Wrox book Beginning iOS Programming: Building and Deploying iOS Applications by Nick Harris; ISBN: 978-1-118-84147-1
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning iOS Programming: Building and Deploying iOS Applications 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 April 10th, 2014, 01:52 AM
Registered User
 
Join Date: Apr 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Saving

In the bands example, I have completed chapter 6 and figured I made a mistake. When I enter a band and all the additional fields, I get a message "Please supply a name for the band". If I enter just the name and no other fields it works? Why is that? I am adding NSLog to see why and how to fix it. I think it is in the textFieldShouldReturn should generate a key if it does not exist or when the init the form it needs it. Any suggestions?

Thanks
 
Old April 10th, 2014, 11:53 PM
Registered User
 
Join Date: Apr 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Saving solved

Here is what I did to solve this issue. Don't know is this the best way to complete it.

Code:
if(!self.bandObject || self.bandObject.name.length == 0)
    {
        self.bandObject.name = self.nameTextField.text;
    }
I inserted this just before the original
Code:
if(!self.bandObject || self.bandObject.name.length == 0)
Hope that helps.





Similar Threads
Thread Thread Starter Forum Replies Last Post
EXCEL question saving a file saving the the first macupryk VS.NET 2002/2003 0 January 6th, 2005 05:33 PM
How To avoid the SAving of toolbars while saving Hari_Word Excel VBA 6 July 26th, 2004 12:13 AM
Saving as zip ppenn Excel VBA 2 March 11th, 2004 05:15 PM
Saving davidhowell1971 Excel VBA 1 March 1st, 2004 04:02 PM
Saving to the clipboard xelepi Javascript How-To 2 November 7th, 2003 07:51 AM





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