• 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: Document infrastructure in a DB-based app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Document infrastructure in a DB-based app


  • Subject: Re: Document infrastructure in a DB-based app
  • From: Scott Stevenson <email@hidden>
  • Date: Sun, 19 Sep 2004 19:17:22 -0700


On Sep 19, 2004, at 3:24 PM, Christian Schneider wrote:

we've got an application that handles four different document types. As it has unfortunately grown in quite an unstructured way I'd like to change it to support Cocoa's document infrastructure. However, while reading up on the topic I noticed the strong bias on file based documents - our application writes directly to a database backend.

As I understand it dataRepresentationOfType: and loadDataRepresentation:ofType: would be the primary methods to load and save document data. In our case what would have to be done is pervert these methods to write and read data from the data base.

You can use -writeToFile:ofType and -readFromFile:ofType instead of the ones you mention.


If you're using local, file-based databases (in other words, not MySQL, Oracle, Postgres), be aware that the initials locations that these methods give you could be inside tmp, so there are some special tricks you have to use to deal with that.

   - Scott

--
Tree House Ideas
http://treehouseideas.com/

_______________________________________________
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


References: 
 >Document infrastructure in a DB-based app (From: Christian Schneider <email@hidden>)

  • Prev by Date: Re: Bindings NSArrayController is changing selectionIndex
  • Next by Date: Re: Bindings NSArrayController is changing selectionIndex
  • Previous by thread: Document infrastructure in a DB-based app
  • Next by thread: find name of hard drive that system folder resides on in Cocoa
  • Index(es):
    • Date
    • Thread