I have a problem with sysfile_writetextfile() - it simply doesn't write anything. The file is created, but left empty.
Here is my function. As you can see, it's mostly copied from the SDK. And yes, it's deferred.
void llll_writetextfile(t_object *x, char *filename, short path, char *buf)
err = path_createsysfile(filename, path, 'TEXT', &fh);
err = sysfile_writetextfile(fh, &buf, TEXT_LB_NATIVE);
err = sysfile_close(fh);
I have checked it in the debugger, and everything looks fine - buf and filename are valid and meaningful, err is always 0. I really can't see what's happening.
(I'm on OSX 10.6.4)