• 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: Changing "MyDocument" to another class
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Changing "MyDocument" to another class


  • Subject: Re: Changing "MyDocument" to another class
  • From: John Saccente <email@hidden>
  • Date: Thu, 21 Feb 2002 12:43:24 -0600

On Thursday, February 21, 2002, at 11:38 AM, James Brasure wrote:

Hi Everyone,

When I create a new "Cocoa Document-based Application" with Project Builder, it creates a default document class called "MyDocument". I would prefer to change the name of this class to something else. Let's call it "TestDocument" for now. Unfortunately I can't figure out how to make all of the necessary changes. Here are the steps that I took:

* Renamed MyDocument.m to TestDocument.m

* Renamed MyDocument.h to TestDocument.h

* Renamed MyDocument.nib to TestDocument.nib

* Changed all occurrences of MyDocument to TestDocument in the source and header files (including the nib name in windowNibName:).

* Opened TestDocument.nib and changed the File Owner to be TestDocument.

* Deleted the MyDocument class from the nib.

* Cleaned the project, rebuilt the project, and ran.

* Every time it launches it reports "Can't create new document".

Hmmm, I must be missing some small detail. However, I scoured the project for 20 minutes and can't find any references to MyDocument. I even used Sherlock to search all of the file contents for MyDocument. It found nothing. Certainly there must be a way to change the name of MyDocument.

What am I mising?



Go to Targets (tab on left) -> Application Settings, choose "expert" in the upper-right-hand corner of the screen, and look in CFBundleDocumentTypes->0 for NSDocumentClass. Change the value from MyDocument to TestDocument.

That might be your problem.

John Saccente
email@hidden
_______________________________________________
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.

References: 
 >Changing "MyDocument" to another class (From: James Brasure <email@hidden>)

  • Prev by Date: Re: Changing "MyDocument" to another class
  • Next by Date: Re: NSImageCell and NSTableView
  • Previous by thread: Re: Changing "MyDocument" to another class
  • Next by thread: Re: Changing "MyDocument" to another class
  • Index(es):
    • Date
    • Thread