The documentation for isInViewingMode
states:
The value of this property is true if the document is in read-only "viewing mode," that is, if the document is locked.
But that seems identical to the isLocked
property, so what really is the difference between these two?
The documentation of isInViewingMode
also states:
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" is very confusing, the document is not locked.
The documentation of isLocked
states:
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.
A document can be in viewing mode in the version browser or locked when writing is not allowed or neither.