• 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: CoreData document based app with single source
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CoreData document based app with single source


  • Subject: Re: CoreData document based app with single source
  • From: Shawn Erickson <email@hidden>
  • Date: Sat, 10 Dec 2005 10:06:09 -0800

A document base application is not restricted to showing a single window for a given document. Review...

<http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/ Tasks/FAQ.html#//apple_ref/doc/uid/20000954-1081525>
<http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/ Tasks/FAQ.html#//apple_ref/doc/uid/20000954-1080900>
<http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/ Tasks/SubclassNSDocument.html#//apple_ref/doc/uid/20000028>

On Dec 10, 2005, at 9:23 AM, Marcus S. Zarra wrote:

I ran into a similar situation a while back. From the sound of your description you want an application that has a single data source but displays multiple windows. If I am understanding you correctly then you do not want a document based application but simply a normal cocoa application that has multiple windows and possibly multiple nib files.

The templates are just examples of normal program designs. They do not cover every possible design out there and while your design could be considered "normal" there is no real template for it. My suggestion is to create a basic core data application, configure it to be able to load the single file from any location (the example stores the single file in app support) and then simply add windows to display the data from that single file as needed.

Marcus

On Dec 10, 2005, at 2:51 AM, Mayo Jordanov wrote:
I'm trying to figure a few things out about Document Based apps. I understand normally there would be a file per document. For the sake of example, if I make a simple invoice application, there will be a CoreData datafile (XML/Binary/SQLite) with some invoice information such as date, customer address, and items.

Now, how would this work if I wanted to have a single CoreData datafile with multiple invoices in it? This solution makes more sense to me as it's much easier to search, enforce unique invoice numbers, etc. From what I can tell the CoreData Document Based app project template expects to have file per document.

I can think of few ways around this, such as putting a small table of existing invoices on top of each document, and thus being able to select from multiple invoices (if I want to look in past) or create a new invoice. Another one would be to make a separate window that could be opened from the application menu where invoices could be looked up and then programatically generate MyDocument windows/objects with each invoice, however wouldn't this be breaking the Document based design? Should I not be using document based design for this at all?

_______________________________________________
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

_______________________________________________
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: 
 >CoreData document based app with single source (From: Mayo Jordanov <email@hidden>)
 >Re: CoreData document based app with single source (From: "Marcus S. Zarra" <email@hidden>)

  • Prev by Date: Re: Making a panel show
  • Next by Date: Re: Making a panel show
  • Previous by thread: Re: CoreData document based app with single source
  • Next by thread: Re: CoreData document based app with single source
  • Index(es):
    • Date
    • Thread