Set OSCP5 arguments from a string...
in
Android Processing
•
2 years ago
I'm having trouble with this. I have an Android sketch where I've used the APWidgets to place a text field for Port and IP, and when the user presses an 'apply' button, it runs a function where it populates two empty strings with the text strings, then attempts to apply them to the OSCP5 instantiation... Eg.
- String port = "";
- String ip = "";
- void setup() {
- ...
- widgetContainer = new APWidgetContainer(this);
- tF_Port = new APEditText(...);
- tF_IP = new APEditText(...);
- widgetContainer.addWidget(tF_Port);
- widgetContainer.addWidget(tF_IP);
- ...
- }
- ...
- void mousePressed() {
- if(mouseX ... ) {
- oscReInit();
- }
- }
- ...
- void oscReInit() {
- port = tF_Port.getText();
- ip = tF_IP.getText();
- println("Port is " + port + " IP is " + ip);
- oscP5 = new OscP5(this, port);
- myRemoteLocation = new NetAddress("ip",port);
- }
Now the printing by itself is working, but maybe the APWidgets isn't returning a String per se ?
Or is this a know problem with OscP5 ?? Anyone have experience with this ?
It is giving me an error during build, attached here:
- /var/folders/cs/csUuSD20FJ8BHJH4lPTttE+++TI/-Tmp-/android4433347945052605982.pde/src/processing/android/test/blitztag/blitzTag.java:304: cannot find symbol
- [javac] symbol : constructor NetAddress(java.lang.String,java.lang.String)
- [javac] location: class netP5.NetAddress
- [javac] myRemoteLocation = new NetAddress("ip",port);
- [javac] ^
- [javac] 2 errors
Quick Links:
Thanks for any feedback...
~ Jesse
1