Hi, I have the following problem, I hope I'll be able to describe it accurately.
I split a string and save the tokens in an array of atoms:
long argc = 0;
str = path->s_name;
char delims = ".";
char *result = NULL;
result = strtok( str, delims );
while( result != NULL )
post("adding %s", result);
result = strtok( NULL, delims );
argc = argc + 1;
When I output the resulting array of atoms out a list outlet and print it, the list looks healthy.
I then send the array of atoms to a [bondo n] object:
typedmess(b->b_firstin, gensym("request"), argc, argv);
[bondo n] outputs as expected, 'request atom1 atom2 etc'. [bondo n] is connected to a [route request]. After the route the list is split and the first item is sent to a coll:
This first item is equal to an index in the coll, which means the coll should output the data that is stored in the matching entry. But it doesn't (*this is my problem*).
So I guess my question is: how is this possible? I input a symbol in a coll that contains a matching entry but the coll doesn't output the appropriate data.
The coll was populated by another object that stored this entry like so:
SETSYM(argv + 1, x->id);
typedmess(b->b_firstin, gensym("store"), 2, argv);
Furthermore, I ran into the following: when I use cnmat's [printit] to print both messages (the one that enters the coll from the bondo object and the one stored as index in the coll, which are equal), I get the following output in the max window, respectively:
printit: received MESSAGE "myLib" (0x1f60ef8, s_thing 0x0) with 0 argument(s):
printit: received MESSAGE "myLib" (0x1f60e74, s_thing 0x0) with 0 argument(s):
Assuming that the hexadecimal value represents the pointer I conclude that both messages, even though the strings are equal, still have a different entry in the symbol table.
If there is an expert (which I am not) that recognizes anything obscure in the code above or in my approach, please let me know. Any help or insight would be warmly appreciated!