NSTableView & NSMatrix & NSController Integration
NSTableView & NSMatrix & NSController Integration
- Subject: NSTableView & NSMatrix & NSController Integration
- From: Vladimir Kozousek <email@hidden>
- Date: Thu, 30 Oct 2003 10:18:08 -0400
This may be very much a newbe question but I am trying to understand
the controller layer and how I can use it for my application.
It seems to me that the controller classes currently available are
designed to be used with NSTableView when a collection of objects needs
to be displayed. I this area I am finding it hard to understand how the
new key-value coding and observing binding integrates with the old
dataSource link. It is not required when the data is displayed; but the
datasource needs to be set when dragging in the table is to be
implemented. What is the proper link for the datasource? I would think
that that is the controller - therefore creating now a double link
(redundant) in the Nib file between the view and the controller. Worse,
the controller now will get messages from the view such as:
- (BOOL)tableView:(NSTableView*)tv acceptDrop:(id <NSDraggingInfo>)info
row:(int)row dropOperation:(NSTableViewDropOperation)op {..}
The controller implementation now needs to be subclassed and becomes
tightly integrated with the view class - something the controller layer
was supposed to minimize?
Ideally I would like to have a controller that is generic enough to not
care whether the view showing the array of data is a NSTableView or
not. I would like to be able to give the user the choice of showing the
data using different formats such as the finder lets us. ie using
either NSTableView, NSOutlineView, or NSMatrix???.
Of course the NSMatrix class is implemented differently - and doesn't
seem to have of provision to have data-displayed that is not
internally managed therefore it makes it very hard to do the proper MVC
design. Is there an other, better way of implementing a spreadsheet
like interface?
Have I missed a point somewhere? Or is this just a reflection of the
incomplete nature of the NSController layer?
thanks,
Vladimir
_______________________________________________
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.