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: Beginning iOS 4 Application Development
This is the forum to discuss the Wrox book Beginning iOS 4 Application Development by Wei-Meng Lee; ISBN: 978-0-470-91802-9
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning iOS 4 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 Display Modes
  #1 (permalink)  
Old February 9th, 2011, 02:09 PM
Registered User
 
Join Date: Dec 2010
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default Chapter 8 list view

hi


I have typed out the first task of making a basic list view, ive checked the tutorial several times, but when i try to run the app, i get a black screen and exist,

i downloaded the tutorial and ran that, and found the movie titles do not appear at all in the list view, could this be an errata?
Reply With Quote
  #2 (permalink)  
Old February 10th, 2011, 10:46 AM
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 project downloads should work. There are issues with how they function, but you should be able to see the list.
When I have time, I am going to try to debug the issues addressed in
Author's code for chapter 8, TableView has issues

Time right now is, unfortunately, limited.

If you can't resolve your problem, send your non-working project file to
ipadhelper@me.com
and I will look at it tonight, to see if I can help out.

Bob
Reply With Quote
  #3 (permalink)  
Old February 10th, 2011, 11:06 AM
Registered User
 
Join Date: Dec 2010
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default thanks

Hi thanks for anytime you can give me, its not a large file, and ive checked it over and over,

i will email you from isoft@live.co.uk with the whole project, i hope this is ok , take care
Reply With Quote
  #4 (permalink)  
Old February 10th, 2011, 02:50 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

2 things, the first will not affect the build.
Code:
@interface TableViewExampleViewController : UIViewController <UITableViewDataSource> {

}
should include the UITableViewDelegate protocol as well

Code:
@interface TableViewExampleViewController : UIViewController <UITableViewDataSource, UITableViewDelegate> {

}
You probably noticed that you had 3 warnings in you project when you build. These need to be eliminated. Delegate methods are tricky because minor typos can create major headaches. See the difference between these? The first is what you had - and is incorrect

Code:
-(NSInteger)tableview:(UITableView *) tableview
numberOfRowsInSection:(NSInteger) section {

	return[listOfMovies count];
}
this is correct

Code:
-(NSInteger)tableView:(UITableView *) tableview
numberOfRowsInSection:(NSInteger) section {

	return[listOfMovies count];
}
A missing capital V is the source of your problem. The method signatures must be exact or nothing gets called. Code completion rarely completes protocol methods. The variable names are irrelevant but everything else has to be exact. Many people recommend copy and pasting delegate methods from the documentation to avoid these types of errors.

Bob
Reply With Quote
The Following User Says Thank You to thepianoguy For This Useful Post:
ios_immy (February 10th, 2011)
  #5 (permalink)  
Old February 10th, 2011, 07:57 PM
Registered User
 
Join Date: Dec 2010
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default

thanks thats fantastic, sorry its such a minor error.
Reply With Quote
Reply


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
bulleted list in grid view MunishBhatia ASP.NET 2.0 Basics 2 December 24th, 2007 03:26 AM
Help Grid View Drop Down List, view all jskinner123 ASP.NET 2.0 Basics 0 November 25th, 2007 05:25 PM
populate details view or list view non empty rows iinfoque ASP.NET 2.0 Basics 0 March 11th, 2007 06:11 AM
how can i cover all itens of a list view? thomaz C# 1 November 30th, 2005 03:30 AM
list view help anilkumar VS.NET 2002/2003 0 January 21st, 2004 11:48 PM



All times are GMT -4. The time now is 06:30 PM.


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