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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to