KVC and Bindings Question
KVC and Bindings Question
- Subject: KVC and Bindings Question
- From: Matthew Brewer <email@hidden>
- Date: Fri, 27 Oct 2006 22:56:59 -0400
I'm trying to implement a simple bookmarks drawer just for fun on an
app I'm writing. All I'm wanting is to have a tableView with names
listed and when you make a selection, I can access the URL that I
have associated with that name. Simple bookmark management.
However, I keep getting an error that I'm not KVC for the key
"bookmarkName". Below is my class code, if anyone has any
suggestions, please shoot away. I looked at the bindings info for my
Array Controller (content selection, key being "bookmarkName" and
other places, like in the bindings for the tableView itself, it looks
like everything should work. I guess I'm missing something pretty
fundamental here. Thanks for the feedback!
Matt
@interface Bookmark : NSObject {
NSString *bookmarkName;
NSURL *url;
}
-(void)setBookmarkName:(NSString *)aName;
-(NSString *)bookmarkName;
-(void)setUrl:(NSURL *)aUrl;
-(NSURL *)url;
@end
@implementation Bookmark
-(void)setBookmarkName:(NSString *)aName {
aName = [aName copy];
[bookmarkName release];
bookmarkName = aName;
}
-(NSString *)bookmarkName {
return bookmarkName;
}
-(void)setUrl:(NSURL *)aUrl {
aUrl = [aUrl copy];
[url release];
url = aUrl;
}
-(NSURL *)url {
return url;
}
@end
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden