XML Feeds

.

[maxmsp] Re: sending raw bytes with net.udp.send

volker böhm vboehm at gmx.ch
Sat Feb 16 08:43:21 MST 2008


On 16 Feb 2008, at 03:14, Seejay James wrote:

>
> Hi Volker, I'm trying to use your code to do exactly what you did  
> -- send a list as bytes rather than ASCII (as the mxj net.udp.send  
> does). I'm running into a few problems (to put it mildly). One that  
> I can't figure out is:
>
> C:\Program Files\Cycling '74\MaxMSP 4.6\Cycling '74\java\classes
> et\udp\send.java[ 42 ] cannot find symbol
> symbol  : method charAt(int)
> location: class com.cycling74.max.Atom[]
> buffer[i] = (byte)a.charAt(i);
>
> It claims there's no method "charAt(int)", but the code I used is  
> essentially identical to yours:
>
> public void list(Atom[] a) {
> int packSize = a.length;
> byte[] buffer = new byte[packSize];  // allocate data buffer
> for (int i=0; i<packSize;i++) {
> buffer[i] = (byte)a.charAt(i);
> }
> 		us.send(a);
> }


hi seejay,
not quite. in my code i was using "charAt(int)" on a String not an  
Atom[].
please send a private email to me, if you need further help.
volker.




More information about the maxmsp mailing list