use NSTextContainer from Notepad initializer
Notepad.init(frame: CGRect, textContainer: NSTextContainer?) does not actually use textContainer. This at least violates obvious expectations :) (And the Liskov Substitution Principle)
Thanks for filing issue. If my memory serves me correctly, I think that that was intentional... Perhaps it's a required initializer?
Yes it is, but if you call Notepad(frame: someFrame, textContainer: myTextContainer), then myTextContainer will be discarded and replaced by another one. While I don't like to fatalError out of situations like this for various reasons (same rationale as for partial functions), that would at least be less surprising and easy to notice.
Simply using the passed-in text container would be best, of course :) I don't know, yet, if that's not possible at all. And this is not very pressing an issue for me personally, so I'm okay with letting this sit here for a while.
Totally makes sense regarding the discarding of the passed in textContainer. I'm fine with letting this sit for a little bit as well, as I think I tried a few things that didn't work in the past.