Re: Document infrastructure in a DB-based app
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