[I've just started looking at different libraries that support text entry -- Gui4P seems the most promising at the moment, but if interfascia or ControlP5 is better for this application, I can switch.]
I'd like to be able to input text and then keep track of user selection-highlighting (done either through user mouse-dragging or shift+cursor key).
Poking through G4P, I've found that the .getFocusObject() method returns the relevant information from a text field, but I'm having datatype troubles:
println(txfML1.getFocusObject());
works like a charm, but if I try something like:
String info = txfML1.getFocusObject();
It returns a "cannot convert from GComponent to String" error.
What do I need to do to here?
[I'm just working with the standard G4P textfield demo code, from quark's website:
1