Re: Where to put dataSource routines
Re: Where to put dataSource routines
- Subject: Re: Where to put dataSource routines
- From: Ondra Cada <email@hidden>
- Date: Thu, 25 Apr 2002 12:39:19 +0200
On Thursday, April 25, 2002, at 05:31 , Mike O'Connor wrote:
The reason I'm torn is it seems like it should be in the controller, but
if
I do that, I'd put them there and probably write virtually the same
methods
in the data object and the controller routines would be a cover for them.
So
why not just put them in the data object
Since generally (perhaps not in your specific app) the controller
dataSource make changes: they filter or sort or localize or hide nil
values or whatever.
(Actually, the model "data source" needs not to conform to the
NSxxxDataSource rules at all, though functionally it of course is close.
Eg., with a simple table, the model would just export an NSArray of items
/probably dictionaries/, an NSMutableArray if editable. The controller
would set the proper NSTableDataSource over that.)
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.