Bao Nguyen
Bao Nguyen

Reputation: 137

Cocoa document-based app edited state: how can I override its default behavior?

I have a document-based application. The app doesn't use Core Data. It has 2 TextFields: one used as an area to edit document (called it main TextField), one used as a search box. By the default, when I type in any of these TextField, the app auto change it state to "edited" and the close button on title bar change.

I disabled autoSaving by overriding:

override class func autosavesInPlace() -> Bool {
    return false
}

What I want is the app only change its state to "edited" when I type in the main TextField. When I type in search TextField, I don't want the app change its state change. How can I achieve this behavior?

Thanks.

Upvotes: 0

Views: 103

Answers (0)

Related Questions