ChimeHQ / TextViewPlus

Make life better with NSTextView+TextKit 1/2
BSD 3-Clause "New" or "Revised" License
46 stars 5 forks source link

TextKitPlus and BaseTextView can’t be used together #1

Open wjk opened 10 months ago

wjk commented 10 months ago

What the title says, really. TextViewPlus makes all kinds of calls to the layoutManager, which will assert in Debug, and return a nil value in Release, when used on a BaseTextView. This will cause the control to break. I don’t believe that this is intentional. Unless there’s something here I’m not seeing, of course. 😉

mattmassicotte commented 10 months ago

Most of this library was built before TextKit 2 existed. BaseTextView is really focused on TextKit 2. That's one of the reasons it is so strict about preventing a TK2 -> TK 1 downgrade. It's so easy to do by accident!

I'm not 100% sure all of the original concepts make sense. They might! But I'm still actively investigating TK2. If you have thoughts/opinions I'd love to hear them!

wjk commented 10 months ago

@mattmassicotte Fair enough. I just assumed it would be this way based on the wording of the documentation. That being said, I think TextKit 2 support would be great, as it would let me standardize on TextKit 2 for all of the text views in my app. Just a thought!

mattmassicotte commented 10 months ago

Absolutely not a bother! The opposite in fact 😃 I'd be happy to answer any other questions you have about any of these repos! Please don't be shy.

I should probably update that. But, these things are really fresh and under active development. And I tend to play pretty fast and loose in that situation, for better or worse.

mattmassicotte commented 8 months ago

I have now made a tiny bit of progress on this, and do intend bridging some of these gaps. How many its clear though, because some concepts do not make sense in the TextKit 2 world.