new document:
- (id)initWithType:(NSString *)typeName error:(NSError **)outError
gets called when a new empty document is created.
opened document:
- (id)initWithContentsOfURL:(NSURL *)absoluteURL ofType:(NSString *)typeName error:(NSError **)outError
gets called when an existing document is loaded.
< index