Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Text Input #69

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

Conversation

schinns
Copy link

@schinns schinns commented Feb 17, 2019

Work In Progress.

text_input

  • Need to handle onChange
  • Need to implement placeholder

Copy link
Member

@wokalski wokalski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! I left some comments to give you pointers.

},
configureInstance: (~isFirstRender as _, {view} as node) => {
style
|> List.iter(attribute =>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just FYI - this doesn't do any magic. In this case the iter does nothing.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know, thanks. 😅
I have so many errors being thrown regarding BriskTextInput.c, I feel like once I get that ironed out I'll have a better way of understanding and implementing the component part.

@end

NSTextInputContext *ml_BriskTextInput_make() {
BriskTextInput *input = [BriskTextInput new];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so ml_BriskTextInput_make should return a view (Like NSTextField or editable NSTextView.) NSTextInputContext is just a protocol (think java interface, functor signature (kinda)) related to text input.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So NSTextInputContext is actually a class and NSTextInputClient is a protocol. Should ml_BriskTextInput_make then return a NSTextField or NSTextView conforming to NSTextInputClient protocol?

@schinns
Copy link
Author

schinns commented Feb 20, 2019

@wokalski thank you for the pointers!! 🙏

@schinns
Copy link
Author

schinns commented Mar 4, 2019

I tried implementing NSTextInputClient, but was blocked due to my unfamiliarity with Objective-C. I was getting a huge list of errors. It was pretty overwhelming to try and get everything to compile.

I am trying a different approach. I borrowed a lot of code from BriskTextView, and made some changes and got the code to compile and render. I will continue to explore Objective-C and documentations to implement remaining features needed for basic text input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants