Re: Binding (KVC/KVO) for C struct datatypes
Re: Binding (KVC/KVO) for C struct datatypes
- Subject: Re: Binding (KVC/KVO) for C struct datatypes
- From: Charles Steinman <email@hidden>
- Date: Thu, 4 Oct 2007 11:29:26 -0700 (PDT)
--- Rudolph van der Merwe <email@hidden> wrote:
> I'm trying to create the following programatic
> binding:
>
> [view bind:@"frame.size.width" toObject:self
> withKeyPath:@"width" options:nil];
There are several problems with this:
1. KVC is a feature of Cocoa -- only Cocoa classes can
implement it. A C struct is not a Cocoa class, so you
can't use KVC to access its members.
2. You can't bind a keypath even if all the segments
in it are KVC-compliant. The binding argument has to
be an exposed binding of the object you're sending the
message to.
3.
____________________________________________________________________________________
Check out the hottest 2008 models today at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html
_______________________________________________
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