`NSDocument` 的 `isInViewingMode` 和 `isLocked` 有什么区别?

What’s the difference between `NSDocument`’s `isInViewingMode` and `isLocked`?

isInViewingModedocumentation 指出: 如果文档处于只读状态 "viewing mode,",即文档处于锁定状态,则此 属性 的值为真。

但这似乎与 isLocked 属性 相同,那么这两者之间的真正区别是什么?

isInViewingMode 的文档还指出:

The value of this property is YES if the document is in read-only "viewing mode," that is, if the document is locked. You can use this information to prevent certain kinds of user actions or changes when the user is viewing an old document revision.

"if the document is locked"很乱,文档没有锁定。

isLocked 的文档指出:

A Boolean value indicating whether or not the file can be written to. This property may contain the value YES because the user lacks the appropriate write permissions, the “user immutable” flag was raised, the parent directory or volume is read only, or the checkAutosavingSafetyAndReturnError: method returned NO.

文档可以在版本浏览器中处于查看模式,或者在不允许写入时锁定,或者两者都不是。