• 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
Correct approach?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Correct approach?


  • Subject: Correct approach?
  • From: Sven <email@hidden>
  • Date: Wed, 27 Jun 2007 16:22:57 +0100

Hello,
I'm working on a library type application and have a few questions regarding
the approach I am using. I've been developing software in C/C++ for years
and have recently moved to Cocoa/Objective-C - just to give you some
background on my experience.

The way I am handling it currently is as follows:

LibraryController - datasource and delegate of an NSTableView which is
responsible for creating and storing library objects (books) in a mutable
array. Details are written to a SQLite database. It handles the addition of
books and removal of books and writing/reading to/from database store

Book class - contains the details of each library item. Constructor should
call NSOpenPanel to get file details of item to add to library.

I'm wondering if this is the correct solution or whether the database
operations should be in a separate class and whether the file handling (via
NSOpenPanel) shouldn't be part of the book class. Also, should Library
controller be the datasource AND the delegate of the NSTableView? Any
further advice appreciated.

My approach works, but I'd like to check with some more experienced Cocoa
developers to see if it fits in with the way it should be according to Cocoa
design methods.

TIA

--

./Sven
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Correct approach?
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: Baffling error migrating Core Data store
  • Next by Date: Re: Guidance for learner
  • Previous by thread: mouseDown events
  • Next by thread: Re: Correct approach?
  • Index(es):
    • Date
    • Thread