Hello all, 

I need to create a textfile from inside an external and I need to give the 
computer a path with a message like:

path /home/path/file.txt

I am therefore creating a method for path with:

        class_addmethod(testtext_class, (t_method)testtext_path, 
gensym("path"), A_GIMME, 0); 

Or should I use A_DEFSYMBOL ? 

But then how can I read the atom inside the external?

I am using:

void testtext_path(t_testtext *x, t_atom *s){
        char teststring[1000];
        atom_string(s, teststring, 1000);
        post(teststring);
}

but then I get the following printout:

consistency check failed: atom_string
333333@ÿÿÿÿs

I'm not sure where to move with this. anybody has any suggestions?

best,

J

Here's the info for atom_string:
atom_string

void atom_string(t_atom *a, char *buf, unsigned int bufsize);
Converts an atom a into a C-string buf. The memory to this char-Buffer has to 
be reserved manually and its length has to be declared in bufsize.

in: 
http://pdstatic.iem.at/externals-HOWTO/node9.html#SECTION00092200000000000000













_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to