Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iphonejudy

macrumors 6502
Original poster
Sep 12, 2008
301
1
Hi,


I got error in the following code.

//This code is used to display the view2 when click the button.

-(IBAction)display:(id)sender
{



Test2ViewController *vController = [[Test2ViewController alloc]
initWithNibName:mad:"Test2View" bundle:[NSBundle mainBundle]];


//I got error in this line only.The simulator stops in tis line
self.view2Controller=vController;


[vController release];


[window addSubview:[view2Controller view]];


[window makeKeyAndVisible];

}
Can anybody please tell me the reason for the error?

Thanks
judy
 

iphonejudy

macrumors 6502
Original poster
Sep 12, 2008
301
1
Hi,


When i run the application.The simulator stops and it highlight the below line

self.view2Controller=vController;

Thanks
judy
 

robbieduncan

Moderator emeritus
Jul 24, 2002
25,611
893
Harrogate
Hi,


When i run the application.The simulator stops and it highlight the below line

self.view2Controller=vController;

Thanks
judy

Yes, but it will post an error, either on screen somewhere or in the logs. Without that we are all just guessing at what we are supposed to be looking for.
 

iphonejudy

macrumors 6502
Original poster
Sep 12, 2008
301
1
When i run the application .When i am pressing the button,it stopped and it highlight that line in the screen.The error shows below the window like

GDB:Stopped at brekpoint 1(hit count:1)-'-display:-Line 24'


Thanks
judy
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.