So I have been searching in a few hours for why my iPhone app hates me. This is the error I get:
Warning: local declaration of 'searchBox' hides instance variable.
Here is my AppDelegate.m
AppDelegate.h
I really don't understand why it says that I am hiding the instance variable.
Warning: local declaration of 'searchBox' hides instance variable.
Here is my AppDelegate.m
Code:
#import "RejseAppDelegate.h"
@implementation RejseAppDelegate
@synthesize window;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Override point for customization after application launch
[window makeKeyAndVisible];
}
- (void)searchBarSearchButtonClicked:searchBox;
{
Warning: local declaration of 'searchBox' hides instance variable.
NSString* sbc = [searchBox text];
[navBar setTitle:sbc];
NSString* purl = @"a";
NSString* ppurl = [purl stringByAppendingString:sbc];
NSString* url = [ppurl stringByAppendingString:@"b"];
[ppurl release];
[purl release];
NSLog(url);
[url release];
[sbc release];
}
- (void)dealloc {
[window release];
[super dealloc];
}
@end
AppDelegate.h
Code:
#import <UIKit/UIKit.h>
@interface RejseAppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
IBOutlet UITableView *resultList;
IBOutlet UISearchBar *searchBox;
IBOutlet UINavigationItem *navBar;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
- (void)searchBarSearchButtonClicked:searchBox;
@end
I really don't understand why it says that I am hiding the instance variable.