• 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: Menu Items "Save" "Save As" and "Revert" won't enable for Document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Menu Items "Save" "Save As" and "Revert" won't enable for Document


  • Subject: Re: Menu Items "Save" "Save As" and "Revert" won't enable for Document
  • From: Michael Nickerson <email@hidden>
  • Date: Mon, 21 Aug 2006 17:35:53 -0400


On Aug 21, 2006, at 1:11 PM, Jerry Krinock wrote:

My app had a non-document window, controlled by an NSWindowController, which
I've just converted to being a document window by cleverly opening the
window nib's classes.nib file and changing the superclass of the old window
controller from NSWindowController to NSDocument, and then implementing the
document load and save methods in its implementation, etc.




But the Save, Save As and Revert menu items are always disabled. Since this
thing is 95% working, I must have neglected one little detail, but I can't
find it. Any guesses would be appreciated.


Jerry Krinock

Since this document is only a few control settings, I am not supporting Undo
and Redo, so I -updateChangeCount:NSChangeDone whenever a change is made.
This all seems to work.


Did you add any document types to your Info.plist file? If you didn't, that's probably why they're disabled; the document controller has no document types to save to or revert from. If you did, then I'm not sure why.

Either way, you can always implement -validateMenuItem: in your document subclass and do your own custom validation there for the menu items.


Darkshadow (aka Michael Nickerson)



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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

  • Follow-Ups:
    • Re: Menu Items "Save" "Save As" and "Revert" won't enable for Document
      • From: Jerry Krinock <email@hidden>
References: 
 >Menu Items "Save" "Save As" and "Revert" won't enable for Document (From: Jerry Krinock <email@hidden>)

  • Prev by Date: delegate method called before awakeFromNib?
  • Next by Date: Re: Providing application resources to a Plugin
  • Previous by thread: Menu Items "Save" "Save As" and "Revert" won't enable for Document
  • Next by thread: Re: Menu Items "Save" "Save As" and "Revert" won't enable for Document
  • Index(es):
    • Date
    • Thread