Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Beginning iPad Application Development
Password Reminder
Register
| FAQ | Members List | Calendar | 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 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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.
Reply With Quote
  #2 (permalink)  
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
Default

The book uses the NSLog in an odd way in a number of places. The way to code the line without warnings is:
Code:
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.
Reply With Quote
Reply


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



All times are GMT -4. The time now is 12:34 PM.


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