Apple documentation suggests to override an NSDocument convenience init (initWithType:error:) as described here.
However, as this is a convenience init, I cannot override it. But I still need to execute some code when a new document is created. I do not want to execute that code when I load a document.
In my particular case I try to initialise an NSPersistentDocument, but I doubt that is relevant.
What shall I do?