Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

iVidCam Free
(free)

Kid Art
($0.99)

iPUBQUIZ
(£1.19)

ArtStudio
($3.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tutorials > Tutorial Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 05-10-2009, 06:07 PM   #1 (permalink)
New Member
 
Join Date: May 2009
Posts: 1
Default Stuck with RSSReader

Heres my code, I followed the tutorial directly but i still get variable undeclared errors...heres my code:

Code:
//
//  RSSReaderAppDelegate.m
//  RSSReader
//
//  Created by Josh Mac on 5/10/09.
//  Copyright __MyCompanyName__ 2009. All rights reserved.
//

#import "RSSReaderAppDelegate.h"

@implementation RSSReaderAppDelegate

@synthesize window;

-(void)applicationDidFinishLaunching:(UIApplication *)application {  
	
    tabBarController = [[UITabBarController alloc] initWithNibName:nil bundle:nil];  
	
    // Create instances of the MainViewController for the 4 TabBar buttons  
    MainViewController *viewController1 = [[[MainViewController alloc] initWithNibName:nil bundle:nil] autorelease];  
    viewController1.tabBarItem.title = @"Browse All";  
    MainViewController *viewController2 = [[[MainViewController alloc] initWithNibName:nil bundle:nil] autorelease];  
    viewController2.tabBarItem.title = @"Most Recent";  
    MainViewController *viewController3 = [[[MainViewController alloc] initWithNibName:nil bundle:nil] autorelease];  
    viewController3.tabBarItem.title = @"Favorites";  
    MainViewController *viewController4 = [[[MainViewController alloc] initWithNibName:nil bundle:nil] autorelease];  
    viewController4.tabBarItem.title = @"Settings";  
    tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, viewController3, viewController4, nil];  
	
    // Add the tab bar controller's current view as a subview of the window  
    [window addSubview:tabBarController.view];  
	
    // Override point for customization after application launch  
    [window makeKeyAndVisible];  
}  


- (void)dealloc {
    [window release];
    [super dealloc];
}


@end
pyr0b0y is offline   Reply With Quote
Old 07-05-2009, 12:11 PM   #2 (permalink)
Tutorial Author
 
Join Date: Jun 2009
Posts: 25
Default

You haven't synthesized your tabBarController variable. So add this:
Code:
@synthesize tabBarController;
... under the line:
Code:
@synthesize window;
And of course you have to declare that variable in your .h file, but I'm guessing you might have done that already?

Remember that all variables that you use @property for in your .h file must be @synthesized in your .m file.
Bovn is offline   Reply With Quote
Old 07-06-2009, 04:09 AM   #3 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 15
Default Where is RSSReader tutorial?

Can you please tell me where I can find the RSSReader tutorial you mentioned here? Thanks.
rcutshaw is offline   Reply With Quote
Reply

Bookmarks

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Online Users: 99
7 members and 92 guests
dljeffery, Max, mlo, noobAppDeveloper, Pof, Rossco, scotopia
Most users ever online was 779, 05-11-2009 at 09:55 AM.
» Stats
Members: 24,142
Threads: 38,919
Posts: 170,747
Top Poster: smasher (2,565)
Welcome to our newest member, p2digital
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:16 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0