Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning iPad Application Development
This is the forum to discuss the Wrox book Beginning iPad Application Development by Wei-Meng Lee; ISBN: 9780470641651
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning iPad Application Development 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 September 12th, 2010, 03:24 AM
Registered User
Join Date: Sep 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Compile warning. Ch.3, p.53.

For the example on p.53-54 in Ch.3 it compiles and runs, but shows a compile warning against the line:

NSLog([NSString stringWithFormat:@"Index is %d", buttonIndex]);

stating "Format not a string literal and no format arguments". What is it complaining about and how can I fix this?

Incidentally, I note that when I run the program in the emulator, the messages only log to the console window the first time the program is run. If I re-run the application within the emulator, nothing is logged - unless I recompile and run.
Old September 13th, 2010, 10:31 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

The book uses the NSLog in an odd way in a number of places. The way to code the line without warnings is:
NSLog(@"Index is %d",buttonIndex);
When you compile (Build and Run) the program and it runs in the emulator you will notice that the Tasks "stop sign" lights up since it is running in the debugger as well. When you launch it in the simulator it is not running in the debugger. Tasks is dim.

Similar Threads
Thread Thread Starter Forum Replies Last Post
CH 14 Pages 749-753 Compile Errors Razzy The Pug BOOK: Ivor Horton's Beginning Visual C++ 2005 1 March 28th, 2008 10:20 AM
Compile Warning... jch02140 C++ Programming 1 September 29th, 2006 07:48 AM
Hung up on Ch 2, Pg 53 - new to VB xxxiii BOOK: Expert One-on-One Access Application Development 4 July 20th, 2006 09:25 AM
Ch 2 Page 53: Undefined index: authuser Airidh BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 25 February 22nd, 2005 07:34 PM
Ch 16 -- compile error w/ components adidaswood BOOK: Beginning ASP.NET 1.0 0 September 22nd, 2004 08:57 PM

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