views:

51

answers:

1

Hi

I have started learning iphone apps development. However when I build and run the project, the simulator opens with new app icon. When I click on the new app icon ...nothing happens.

-->> simulator just sits there and doesn't load the app

Any help will be appreciated.

Marty

A: 

Actually it is not my code. I got it from the book I am studying from. Here it is:-

#import "basicViewController.h"

@implementation basicViewController

@synthesize txtName;
@synthesize lblMessage;

- (IBAction) doSomething;
{
    NSString *msg =[[NSString alloc] initWithFormat:@"Hello, %@", txtName.text];
    [lblMessage setText:msg];
    [msg release];


}



- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];

    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}


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

@end

//------------------------



#import <UIKit/UIKit.h>

@interface basicViewController : UIViewController {
    IBOutlet UITextField *txtName;
    IBOutlet UILabel *lblMessage;
}
@property (nonatomic, retain) IBOutlet UITextField *txtName;
@property (nonatomic, retain) IBOutlet UILabel *lblMessage;

- (IBAction) doSomething;



@end