Re: Would bindings make sense ?
Re: Would bindings make sense ?
- Subject: Re: Would bindings make sense ?
- From: Jim Hagen <email@hidden>
- Date: Tue, 20 Jul 2004 17:10:04 -0700
On Jul 20, 2004, at 12:09 PM, Scott Anguish wrote:
On Jul 20, 2004, at 7:26 AM, Bertrand Mansion wrote:
My concern is that I don't know in advance which columns my tableview
has
because this is configured by the end-user. So the form that will be
used for
the detail view will be dynamically generated. And i guess I am going
to use a
mutable dictionary to store the values entered by the user.
bindings will still work for this, but you'll need to create the
tableview column bindings programmatically, since you won't know in
advance the configurations to use in IB.
just to back up Scott's answer, I'm doing this, using something like
[myColumn bind:@"value" toObject:aController
withKeyPath:keyPath options:nil];
after programatically creating myColumn. In my case, I didn't know how
many columns I'd have.
It's a little bit less code than I had used in examples of the same
type of thing using the dataSource design pattern. As to if it 'makes
sense', that's an exercise for the reader. It worked in my case, and
does provide some benefits. In case it's not clear, the "aController"
above is an NSArrayController instance.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.