• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
KVC and Bindings Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: KVC and Bindings Question
      • From: Scott Stevenson <email@hidden>
  • Prev by Date: Re: (RS)What's the type of a selector?[2]
  • Next by Date: (RS)What's the type of a selector?[3]
  • Previous by thread: Re: What's the type of a selector?
  • Next by thread: Re: KVC and Bindings Question
  • Index(es):
    • Date
    • Thread