coll object – loading from files

Dec 5, 2007 at 4:47pm

coll object – loading from files

with the coll object, is it possible to load a file specified by a variable?

eg. using the message “read (var)”.

I have tried using $1, but it throws an error. I’ve also tried sending the read message from a javascript object, but nothing seems to happen.

Thanks in advance

#34900
Dec 5, 2007 at 9:03pm

you probably want to tell the path of your file to coll if the file is not in your search path.
[sprintf] will be your friend for these kind of things.

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 161 122 20 196617 t b;
#P message 185 122 114 196617 read /myPath/myFile1;
#P newex 186 99 62 196617 prepend set;
#P message 209 46 14 196617 3;
#P message 193 46 14 196617 2;
#P message 178 46 14 196617 1;
#P newex 186 77 159 196617 sprintf read /myPath/myFile%ld;
#N coll ;
#P newobj 185 172 53 196617 coll;
#P comment 225 46 100 196617 your variables ….;
#P connect 6 0 8 0;
#P connect 6 0 7 0;
#P connect 8 0 7 0;
#P connect 7 0 1 0;
#P connect 2 0 6 0;
#P connect 5 0 2 0;
#P connect 4 0 2 0;
#P connect 3 0 2 0;
#P window clipboard copycount 9;

Quote: tom_turton@hotmail.com wrote on Wed, 05 December 2007 17:47
—————————————————-
> with the coll object, is it possible to load a file specified by a variable?
>
> eg. using the message “read (var)”.
>
> I have tried using $1, but it throws an error. I’ve also tried sending the read message from a javascript object, but nothing seems to happen.
>
>
> Thanks in advance
—————————————————-

#118352
Dec 6, 2007 at 1:51pm

and don’t forget, $1 in a message box only understands numbers. for
symbols you need to use [prepend], [sprintf] or something along those
lines.

M

On Dec 5, 2007, at 16:47, Tom wrote:

>
> with the coll object, is it possible to load a file specified by a
> variable?
>
> eg. using the message “read (var)”.
>
> I have tried using $1, but it throws an error. I’ve also tried
> sending the read message from a javascript object, but nothing
> seems to happen.
>
>
> Thanks in advance

#118353

You must be logged in to reply to this topic.