• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Where to put dataSource routines
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
References: 
 >Where to put dataSource routines (From: "Mike O'Connor" <email@hidden>)

  • Prev by Date: Re: Application, Home, ... folders
  • Next by Date: Inches, Centimeters, and NSMeasurementUnit
  • Previous by thread: Where to put dataSource routines
  • Next by thread: Re: Where to put dataSource routines
  • Index(es):
    • Date
    • Thread