--------------------------------------------------------------
| 160 | |
| 161 | //-------------------------------------------------------------- |
| 162 | void testApp::sendCurrentCommand(){ |
| 163 | string command = commandInput->getTextString(); |
| 164 | if(command != ""){ |
| 165 | cout << "sending command " << command << endl; |
| 166 | ofxOscMessage m; |
| 167 | m.setAddress(command); |
| 168 | vector<string> args; |
| 169 | args.push_back( arg1->getTextString() ); |
| 170 | args.push_back( arg2->getTextString() ); |
| 171 | args.push_back( arg3->getTextString() ); |
| 172 | for(int i = 0; i < args.size(); i++){ |
| 173 | |
| 174 | if(args[i] == "" || args[i] == " "){ |
| 175 | break; |
| 176 | } |
| 177 | |
| 178 | if( isNumber(args[i]) ){ |
| 179 | if(args[i].find(".") != string::npos){ |
| 180 | m.addFloatArg(ofToFloat(args[i])); |
| 181 | cout << " added " << args[i] << " as float " << endl; |
| 182 | } |
| 183 | else{ |
| 184 | m.addIntArg(ofToInt(args[i])); |
| 185 | cout << " added " << args[i] << " as int " << endl; |
| 186 | } |
| 187 | } |
| 188 | else{ |
| 189 | m.addStringArg(args[i]); |
| 190 | cout << " added " << args[i] << " as string " << endl; |
| 191 | } |
| 192 | } |
| 193 | sender.sendMessage(m); |
| 194 | } |
| 195 | } |
| 196 | |
| 197 | //-------------------------------------------------------------- |
| 198 | void testApp::clearArgs(){ |
nothing calls this directly
no test coverage detected