Can I use STBTextEditView on macOS?

I’ve been working on a custom TextEdit control for inputting sysEx messages. It includes functions to prevent the user from inputting invalid characters, adding a delimited between hex pairs, and a few other things that require reading and setting the current cursor position of the TextEdit.

I was able to implement it on Windows and Linux just fine, but it looks like macOS NSTextField won’t allow to me to set the position of the cursor.

On Linux the CTextEditor is derived from the GenericTextEdit and STBTextEditView classes. Would it be possible to use those classes for my custom TextEdit on macOS?

The answer is yes, you can use the GenericTextEdit on macOS.

//-----------------------------------------------------------------------------
SharedPointer<IPlatformTextEdit> NSViewFrame::createPlatformTextEdit (IPlatformTextEditCallback* textEdit)
{
	//return makeOwned<CocoaTextEdit> (nsView, textEdit);
    return makeOwned<GenericTextEdit> (textEdit);
}