• 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
NSDocument Default Contents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSDocument Default Contents


  • Subject: NSDocument Default Contents
  • From: The Amazing Llama <email@hidden>
  • Date: Mon, 14 Jul 2003 16:52:19 -0700

I'm implementing an NSDocument subclass, which is simple enough.

I know that if I want to make something happen in all documents, new or opened, I put that code in -init.

If I want it to take place only in opened documents, the code goes in -initWithContentsOfFile:

Where should I put code that should fill a new document with 'default' data? Should I put it in -init, and then erase it in -initWithContentsOfFile? That seems a little kludgey.

Better ideas?

Seth A. Roby The Amazing Llama < mail or AIM me at tallama at mac dot com>
"Life is like an exploded clown. It's really funny until you figure out what just happened."
_______________________________________________
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.
  • Follow-Ups:
    • Re: NSDocument Default Contents
      • From: James Quick <email@hidden>
    • Re: NSDocument Default Contents
      • From: James Quick <email@hidden>
    • Selecting Individual Cells in NSTableView
      • From: "Francisco J. Bido" <email@hidden>
  • Prev by Date: Re: Hide and go seek.
  • Next by Date: Selecting Individual Cells in NSTableView
  • Previous by thread: Re: SQLite and TableView
  • Next by thread: Selecting Individual Cells in NSTableView
  • Index(es):
    • Date
    • Thread