• 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: [myNSWindow setDocumentEdited:dirtyB] fail ??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [myNSWindow setDocumentEdited:dirtyB] fail ??


  • Subject: Re: [myNSWindow setDocumentEdited:dirtyB] fail ??
  • From: "David M. Cotter" <email@hidden>
  • Date: Fri, 7 Aug 2009 17:53:34 -0700

there is no controller, there is no NSDocument, there is no NSUndoManager.

this is code that has been carbon forever and now has absolutely minimal cocoa enough to get it running. if there is an NSDocument i don't know about it.

On Aug 7, 2009, at 5:41 PM, Graham Cox wrote:


On 08/08/2009, at 10:20 AM, David M. Cotter wrote:

[myNSWindow setDocumentEdited:dirtyB]

it doesn't set the little red dot in the close box. and yes, "dirtyB" is set to "YES".


Have you tried setting it on the window's controller instead? The controller may need to synch with the window in some way...

Alternatively, you say you have no document model, but if you are using NSDocument or NSUndoManager it will probably take over this function and prevent you from directly setting the dirty state. Since NSWindow can have an undo manager not associated with a document, maybe this is what's happening? In which case there's no reason to set the dirty bit at all, just put your undo tasks on the stack and it'll handle it for you.

--Graham



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: [myNSWindow setDocumentEdited:dirtyB] fail ??
      • From: Marco S Hyman <email@hidden>
References: 
 >[myNSWindow setDocumentEdited:dirtyB] fail ?? (From: "David M. Cotter" <email@hidden>)
 >Re: [myNSWindow setDocumentEdited:dirtyB] fail ?? (From: Graham Cox <email@hidden>)

  • Prev by Date: Re: adding a sub menu to multiple super menus?
  • Next by Date: Re: adding a sub menu to multiple super menus?
  • Previous by thread: Re: [myNSWindow setDocumentEdited:dirtyB] fail ??
  • Next by thread: Re: [myNSWindow setDocumentEdited:dirtyB] fail ??
  • Index(es):
    • Date
    • Thread