【发布时间】:2012-08-14 23:44:44
【问题描述】:
我在这个错误中是堆栈使用未声明的标识符不同的常见错误,有时很容易修复,但无论如何我都是堆栈,可能我看错了。
我正在尝试做一个日志,人们可以在其中写下他们想要的内容并保存在 plist 中。
从我将显示所有保存的文件的 tableView 中,我将推送到 xib 视图,人们可以在其中填写字段。我已经导入了新的 .h 和我定义密钥的 .h。
出现错误的地方。
- (void) viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
name.text = [bookLog objectForKey:NAME_KEY];
placeTextView.text = [bookLog objectForKey:PLACE_KEY];
file1TextView.text = [bookLog objectForKey:FILE1_KEY];
file2TextView.text = [bookLog objectForKey:FILE2_KEY];
}
bookLog 有 4 个错误,每行有 1 个错误,name.text、placeTextView.text、file1TextView.text、fileTextView.text 有 1 个错误。
有什么想法吗?
谢谢
【问题讨论】:
-
你能发布名称、placeTextView 等的声明吗?我的猜测是你将它们声明为 \@property's,然后用别名合成它们,就像这样 \@synthesize name=_name ;
-
嗨 Dahn .. .h { NSDictionary *bookLog; IBOutlet UITextField *name; IBOutlet UITextView *placeTextView; IBOutlet UITextView *file1TextView; IBOutlet UITextView *file2TextView; } \@property (nonatomic, 保留) NSDictionary *bookLog; \@property (nonatomic, 保留) UITextField *name; \@property (nonatomic, 保留) UITextView *placeTextView; \@property (nonatomic, 保留) UITextView *file1TextView; \@property (nonatomic, 保留) UITextView *file2TextView; \@end --- .m \@synthesize bookLog, name, placeTextView, file1TextView, file2TextView;
-
嗯。我认为您在问题或评论中发布的内容没有任何问题。它可能需要查看整个 .m 和 .h。你能在某个地方发帖(比如pastebin)吗?
-
嗨 Danh.. 我已经在 ((past bin)) 上发布了.. 问题标题和这里一样,我的昵称也一样.. 提前谢谢
-
抱歉,我找不到。你能把链接贴在这里吗?
标签: iphone ios5 xcode4 xcode4.3