Help debugging bindings issues
Help debugging bindings issues
- Subject: Help debugging bindings issues
- From: Alex Smith <email@hidden>
- Date: Fri, 08 May 2009 10:44:07 -0600
Hi,
I'm very new to Cocoa development, but I am stuck on what I'm sure
will end up being a very stupid mistake. The book I am working through
(Cocoa Programming for Mac OS X by Aaron Hillegass), has me creating a
simple app with table and two columns. However, the bindings to each
of the properties for those columns are throwing the following message
into the debug console when I fire it up.
[ addObserver:forKeyPath:options:context:] is not supported. Key path:
personName
I downloaded the author?s example and diffed my code with his and
there are no differences other than the fact that his example works
(grr). After reading the archives here and googling quite a bit I have
found some similar thread where the poster was completely confused
about the problem and then ended up recreating from scratch either the
nib/xib or the xcode project to fix the problem. Is this SOP for Cocoa
development? Do you really just come into work one day and say "crap,
my bindings are working I guess I'll start over."
My goal is to debug and determine what stupid thing I have done. I
don't want to just start over, have it work and forget about it.
Here is what I hope is the relevant code
Person.h:
@interface Person : NSObject {
NSString *personName;
float expectedRaise;
}
@property (readwrite, copy) NSString *personName;
@property (readwrite) float expectedRaise;
@end
Person.m
@synthesize expectedRaise;
@synthesize personName;
- (id)init
{
[super init];
expectedRaise = 5.0;
personName = @"New Person";
return self;
}
Thanks!
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden