You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Notepad.init(frame: CGRect, textContainer: NSTextContainer?) does not actually use textContainer. This at least violates obvious expectations :) (And the Liskov Substitution Principle)
The text was updated successfully, but these errors were encountered:
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.
Notepad.init(frame: CGRect, textContainer: NSTextContainer?)
does not actually usetextContainer
. This at least violates obvious expectations :) (And the Liskov Substitution Principle)The text was updated successfully, but these errors were encountered: