开发者

I'm wondering how to add the @synthesize statements for the MovieEditorViewController header file in XCode

开发者 https://www.devze.com 2023-03-10 21:55 出处:网络
The implementation file looks like this: #import \"MovieViewController.h\" #import \"Movie.h\" #import \"MovieEditorViewController.h\"

The implementation file looks like this:

#import "MovieViewController.h"
#import "Movie.h"
#import "MovieEditorViewController.h"

@implementation MovieViewController

@synthesize titleLabel;
@synthesize boxOfficeGrossLabel;
@synthesize summaryLabel;
@synthesize movie;

but i'm thinking my problem is not adding @synthesize statements for the MovieEditorViewController header file. If it's not this then I've included the debugging log below.

I'm really new to programming and I really can't seem to figure out whats going wrong. When I run the iOS simulator and click the button to display editable text fields the program terminates and goes back to the homescreen. The debugger shows as follows:

[Session started at 2011-06-04 13:00:00 +0100.] 2011-06-04 13:00:05.568 Movie[6678:207] -[MovieViewController editingViewController]: unrecognized selector sent to instance 0x8a3bd10 2011-06-04 13:00:05.572 Movie[6678:207] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MovieViewController editingViewController]: unrecognized selector sent to instance 0x8a3bd10' * Call stack at first throw: ( 0 CoreFoundation

0x00dc95a9 exceptionPreprocess + 185 1 libobjc.A.dylib

0x00f1d313 objc_exception_throw + 44 2 CoreFoundation

0x00dcb0bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187 3

CoreFoundation

0x00d3a966 __forwarding + 966 4

CoreFoundation

0x00d3a522 _CF_forwarding_prep_0 + 50 5 Movie

0x000021b4 -[MovieViewController edit] + 62 6 UIKit 0x002b94fd -[UIApplication sendAction:to:from:forEvent:] + 119 7 UIKit

0x00349799 -[UIControl sendAction:to:forEvent:] + 67 8

UIKit

0x0034bc2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527 9 UIKit

0x0034a7d8 -[UIControl touchesEnded:withEvent:] + 458 10 UIKit

0x002ddded -[UIWindow _sendTouchesForEvent:] + 567 11 UIKit

0x002bec37 -[UIApplication sendEvent:] + 447 12 UIKit 0x002c3f2e _UIApplicationHandleEvent + 7576 13 GraphicsServices

0x01721992 PurpleEventCallback + 1550 14 CoreF开发者_如何学JAVAoundation

0x00daa944 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 52 15 CoreFoundation 0x00d0acf7 __CFRunLoopDoSource1 + 215 16 CoreFoundation

0x00d07f83 __CFRunLoopRun + 979 17 CoreFoundation

0x00d07840 CFRunLoopRunSpecific + 208 18 CoreFoundation

0x00d07761 CFRunLoopRunInMode + 97 19 GraphicsServices

0x017201c4 GSEventRunModal + 217 20 GraphicsServices

0x01720289 GSEventRun + 115 21 UIKit 0x002c7c93 UIApplicationMain + 1160 22 Movie

0x00001b40 main + 102 23 Movie

0x00001ad1 start + 53 24 ???

0x00000001 0x0 + 1 ) terminate called after throwing an instance of 'NSException'

If anyone could point me in the right direction i'd be very grateful...

Thanks!


Looks like you're in the iPhone SDK Development book. Have you made it to section 4.8 yet? The error says that your MovieViewController doesn't have a property named editingViewController, which is something you add in 4.8. The project won't build and run until you get through section 4.9, which is where you make some connections.

0

精彩评论

暂无评论...
验证码 换一张
取 消