react-juce icon indicating copy to clipboard operation
react-juce copied to clipboard

How to Manually Focus a TextInput

Open gabriel-earle opened this issue 1 year ago • 0 comments

Or perhaps, a more general question, how do I get some kind of reference to a view that is rendered?

It's not too important if it's in C++ or JS because the interop strategies are working well for me. I set up my code so that my JUCE AudioProcessor owns an EcmascriptEngine and a ReactApplicationRoot that was constructed with the owned engine. So I have a reference to these two things. However, the public methods/properties of these two alone do not seem to be enough to manipulate specific Views that are rendered.

I've also tried to figure out if any of methods belonging to the __NativeMethods__ global object can help me achieve this, but I can't find anything that works.

I think the main challenge is getting the viewId of the views in my UI. If I can get those, I can use __NativeMethods__.setViewProperty/invokeViewMethod.

Any ideas?

gabriel-earle avatar Dec 22 '23 06:12 gabriel-earle