Need help wrapping my head around bindings
Need help wrapping my head around bindings
- Subject: Need help wrapping my head around bindings
- From: Cem Karan <email@hidden>
- Date: Mon, 10 Dec 2007 21:21:02 -0500
Hi all, I'm trying to wrap my head around bindings, and I'm trying to
do it in an Objective-C 2.0 kind of way. I'm hoping some kindly (and
well-informed!) individual can help me out. Here are my questions:
1) When I create a class instance, it has instance variables. The
Objective-C 2.0 method for accessing these is via the @property
directive. Does using @property automatically make an instance KVO
compliant in addition to KVC compliant? That is, would the following
declaration (the the corresponding @synthesize) make 'contents'
something I can bind to?
@interface CFKcontroller : NSObject {
NSMutableArray *contents;
}
@property(retain) NSMutableArray *contents;
@end
2) Assuming that #1 is correct, how do I bind to it using an array
controller? I have tried to a) using an array controller bound to
CFKcontroller for its content, with 'contents' as its key, and I have
tried binding an object controller to the object, then bind an array
controller to the object controller. Neither way worked for me.
BTW, I have code, but project/code is too large for the list server,
and I don't have any place I can upload it to. If anyone wants it, I
can email it to them directly off the list; zipped, its about 75 KB.
My ultimate goal is to figure out how to use the new NSCollectionView
as it appears to be exactly what I want when it comes to quickly
beating out GUIs for those quick & dirty little apps that people
always ask me for.
Any help would be appreciated,
Cem Karan
PS, I'm on the list in digest mode, so I may seem to respond slowly,
or out of order with what everyone is telling me; if so, I apologize.
_______________________________________________
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