Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Beginning iOS 4 Application Development
Password Reminder
Register
| FAQ | Members List | 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 Search this Thread Display Modes
  #1 (permalink)  
Old January 24th, 2011, 01:40 PM
Registered User
 
Join Date: Jan 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 4: windowBasedApp example - Doesn't work?

All,

I've gone through the windowBasedApp example starting on page 85 twice now, with no success. When I run the application I get the same blank white screen as when I run the application on step 2.

I'm using Simulator 4.2.

Does anyone else have any issues with this application? I've double checked everything to ensure I've followed the example. Has anyone gotten it to work?

EDIT: What makes this especially frustrating is that the rest of the examples in Chapter 4 build of this project. So if it doesn't work, the rest probably won't.

Thanks for any and all help.

Lukas

Last edited by lukasbradley; January 24th, 2011 at 02:15 PM..
Reply With Quote
  #2 (permalink)  
Old January 24th, 2011, 02:51 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 do not have this book but the identical project was in a previous book. There were omissions in the project as presented in the previous book, and it is possible the same errors persist.
First:
Make sure you save all changes you make in Interface Builder. This is not specified in the steps in the other book.
When making edits in the windowBasedAppAppDelegate.h a few lines that should have been bold were
not in bold type
Code:
@class HelloWorldViewController;
HelloWorldViewController *viewController;
@property (nonatomic, retain) IBOutlet HelloWorldViewController *viewController;
If these errors have not been corrected in the new book, then the project will not work.
Bob
Reply With Quote
  #3 (permalink)  
Old January 24th, 2011, 02:54 PM
Registered User
 
Join Date: Jan 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Same problem for me...haven't figured it out yet.
Reply With Quote
  #4 (permalink)  
Old January 24th, 2011, 03:03 PM
Registered User
 
Join Date: Jan 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK...I figured out what the problem was for me.

In step 12, after control-click and drag the Window Based App App Delegate item to the Hello World View Controller item, you need to select viewController in the popup. I didn't do that the first time - missed it in the instructions.

Hope it helps.
Reply With Quote
  #5 (permalink)  
Old January 24th, 2011, 03:15 PM
Registered User
 
Join Date: Jan 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by DrakeC View Post
OK...I figured out what the problem was for me.

In step 12, after control-click and drag the Window Based App App Delegate item to the Hello World View Controller item, you need to select viewController in the popup. I didn't do that the first time - missed it in the instructions.

Hope it helps.
I'm certain I've done this, and saved. Are you saying that it all DOES work for you?

Are you using SDK 4.2 or 4.0?
Reply With Quote
  #6 (permalink)  
Old January 24th, 2011, 03:22 PM
Registered User
 
Join Date: Jan 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by thepianoguy View Post
I do not have this book but the identical project was in a previous book. There were omissions in the project as presented in the previous book, and it is possible the same errors persist.
First:
Make sure you save all changes you make in Interface Builder. This is not specified in the steps in the other book.
When making edits in the windowBasedAppAppDelegate.h a few lines that should have been bold were
not in bold type
Code:
@class HelloWorldViewController;
HelloWorldViewController *viewController;
@property (nonatomic, retain) IBOutlet HelloWorldViewController *viewController;
If these errors have not been corrected in the new book, then the project will not work.
Bob
Hey Bob, thanks for the reply.

Yes, all of these lines are in boldface in the new book, and I included them in my code.
Reply With Quote
  #7 (permalink)  
Old January 24th, 2011, 03:28 PM
Registered User
 
Join Date: Jan 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I downloaded the example code from the WROX site, and attempted to run the project. Unfortunately, it is hard-coded to use SDK 4.0. I can't figure out how to download older SDKs from Apple, and I'm extremely unfamiliar with the project structure to switch it to 4.2. However, I'll let everyone know if I'm successful on this path.

EDIT 1: Well, I figured out how to change the links to the Frameworks in the project, but it wouldn't build until I re-loaded the project. Unfortunately, the code is the LAST version of the project. As I noted before, the first example is used in later examples from that chapter. I guess my next step is to continue my version of the project and pray that it works on the next example.

Last edited by lukasbradley; January 24th, 2011 at 03:36 PM..
Reply With Quote
  #8 (permalink)  
Old January 24th, 2011, 09:24 PM
Registered User
 
Join Date: Jan 2011
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default SOLVED: User Error

All, thank you much for your replies.

I went back through the example a third time, saving after EVERY edit I did, and that worked. I'm assuming my problem as not saving each of the Interface Builder edits.

Apologies for the "user error" post. Thanks again.
Reply With Quote
  #9 (permalink)  
Old January 25th, 2011, 12:36 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

Glad you got the project to work.
Updating the SDK is covered in some other threads. It is always good to see if the topic has come up before.
Hello World - Old SDK?
no sdk with the name or path 'iphone.4.'

Your problem sounded like an Interface Builder problem. Just make a habit of saving changes in Interface Builder when ever you switch back to Xcode and vice versa.
Good luck with the rest of the book.
Bob
Reply With Quote
  #10 (permalink)  
Old May 17th, 2011, 09:21 PM
Registered User
 
Join Date: May 2011
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am also unable to make it work!

I did it twice with the same result.
And yes I did a save after each edition of .xib files...

I started suspecting something is not going well at step 9, when they ask to select HelloWorldViewController as NIB name. For me, the drop down list was empty!
So I typed it manually.

I also supposed XCode should be able to autocomplete the class name after the @class. I am right? If yes, there is no HelloWorldViewController in my autocompletion list...

I double and even tripple check all my code and it still does not work.
No compilation errors or any warning. The iPhone Simulator just show a blank screen....

I am using XCode 4. But it should not make any difference I think.

Any idea someone?
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
Chapter 1 javascript won't work Bob Sulewski BOOK: ASP.NET 4 24-Hour Trainer 6 January 31st, 2012 08:18 AM
chapter one doesn't work in rails 2.0.2 wanguan2000 BOOK: Beginning Ruby on Rails 15 May 16th, 2009 11:39 PM
Chapter 1 Ctrl+F5 don't work, F5 does work? jimboak BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 7 June 29th, 2008 03:46 AM
a example of chapter doesn't work. mizimizi Classic ASP XML 2 October 19th, 2003 01:27 PM



All times are GMT -4. The time now is 10:01 AM.


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