Re: NSTableColumn subclass and custom binding
Re: NSTableColumn subclass and custom binding
- Subject: Re: NSTableColumn subclass and custom binding
- From: Matt Neuburg <email@hidden>
- Date: Fri, 25 Aug 2006 12:24:55 -0700
- Thread-topic: NSTableColumn subclass and custom binding
On Fri, 25 Aug 2006 16:58:46 +0200, Alexander Lamb <email@hidden> said:
>Even if I abandonned the bindings route and used only the "tableView will
display cell..." I am still stuck with updates "pushed" from the model. I would
need to have my NSTableColumn subclass register for changes in all the objects
displayed. Seems wrong in a way (because it really means I need to keep hold of
an NSArray of objects from the model in my NSTableColumn subclass).
I'm not understanding what's bad about this implementation. The
NSTableColumn delegate is asked about each cell before it is displayed. The
logic of how it responds can involve consulting the model. Presumably there
is some simple mapping between the position of the cell and some way of
looking up the info in the model, so there you are.
As I said the other day in response to a different question, you might want
to start by not using bindings at all. Now you're back to what we used to do
in the old days (a table datasource and the Three Big Questions). Once
you've seen how to manage the table display that way, you can migrate part
of it into using bindings (and leave alone whatever part does not use
bindings). m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
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