2019 r1 has been near unusable on Mac

[quote=435141:@jim mckay]That would make sense then that Xojo isn’t anticipating being asked for touchbar items and releases the input context on deactivate (pure speculation of course). Apple assumes that everyone wants to provide items for the touch bar.

Does the IDE use TextInputCanvas? That has an override to return nil for inputContext if the view is not editable.

That would make a lot of sense if Apple isn’t getting the context into a local variable and operating on that, but rather using a function call result for each new call, and assuming it’s never going to be nil.

So essentially once deactivate is called, the next call goes to a nil object and boom… That is, if the IDE uses TextInputCanvas.[/quote]
According to Apple’s docs, this property is nil when the object doesn’t conform to the NSTextInputClient protocol. Returning Nil when the editor is read-only seems like the right thing to do in that case.

That said, this is one of those bugs where we have been searching for reproducible steps. I’ve personally seen this on and off since early December, but haven’t been able to reliably reproduce it yet.

Ok, interesting… XCode has a touchBar simulator… good to know

[quote=435145:@Greg O’Lone]According to Apple’s docs, this property is nil when the object doesn’t conform to the NSTextInputClient protocol. Returning Nil when the editor is read-only seems like the right thing to do in that case.

[/quote]
Right, but it does conform according to the header… (I’m assuming the IDE is using TextInputCanvas. Is that correct?)

@interface XOJTextInputView : NSView <NSTextInputClient> {

If a protocol is adopted by a class, it’s always adopted by that class. I don’t think you can opt out at runtime…

In any case, I tried compiling the TextInputCanvas plugin and I can’t get it to crash… If I return nil for inputContext, it just ignores input. I have TouchBar Simulator running, but maybe the TIC Example project is just too simple. Might be different with actual hardware too… and it may just be an Apple bug.

CMP means Classic Mac Pro (i.e. <= 5.1). The cylinder Mac Pros are 6.1.