charlieroberts / interface.js

gui library for music / arts applications that works with touch, mouse and motion events
213 stars 45 forks source link

Incorrect error message when OSC socket not connected #14

Open t3kt opened 8 years ago

t3kt commented 8 years ago

The OSC.send function is currently implemented as follows: if( this.socket.readyState === 1) { [.......] }else{ console.log("INVALID OSC MESSAGE FORMATION", arguments); } }

and when the socket is ready, it does: if(typeof _address === 'string' && typeof _typetags === 'string') { ... }else{ console.log( 'socket is not yet connected...' ) }

That means that if socket.readyState != 1, it says "invalid osc message..." and if the message is invalid, it says "socket is not yet connected...".