Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Document Edit State, Undo and Cocoa Bindings (Joseph Jones)



Hi! I hope that I'm understanding the problem.

> How in the world do you bind the documents edit state when using
> bindings to
> update your data? I'd assume this would be cooked in there, but I
> can't find anyway to get this to work.

If you have a NSDocument subclass, you can add the method
- (BOOL)isDocumentEdited
{
  return [[myViewDocument window] isDocumentEdited];
}

(it's going to help to you for a "Graceful Application Termination")

and in the View object (myViewDocument) you can add the line
[[self window] setDocumentEdited:YES];

where you like indicate that the document is edited.

Regards
Amilcar


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.