Mac OSX 10.8.4
msgfile fails to open .txt files for writing text buffers. the message is "msgfile: failed to open file.txt"
could this be a permission problem?
does it work if you specify the full path, e.g. "/tmp/file.txt" instead of "file.txt"?
You seem to have CSS turned off.
Please don't fill out this field.
/usr/file.txt failed but /tmp/file.txt did not
which is desired behaviour: in order to write to the /usr/ directory, you need super-cow powers.
actually, with the attached patch only one line of "pants;" gets written
is there a reason why you "bang" [msgfile] after each "add"?
(if you remove the bang, everything is working as expected).
anyhow, this is seems to be a different bug, please create a separate ticket.
I realized after posting the example that I got the syntax wrong, however it seemed odd to me that write text.txt should work in textfile and not msgfile. Does this mean msgfile requires an absolute path and superuser permissions? if so do you know if it is possible to set those permissions for pd?
super-user permissions are only required if you want to write files to places where an ordinary user should not write files to, e.g. '/usr' (which really is the system's infrastructure directory, and not the directory where every user puts their stuff).
[msgfile] currently tries to create the file in the working directory of the Pd-process (which might be /), whereas [textfile] tries to create the file in the working directory of the abstraction containg [textfile] (that is: the directory where the .pd-file is saved).
arguably, both are bad choices (files should be written in the directory of the master patch).
for now, you might want to use absolute filenames.
that makes sense, thank you for the explanations. Perhaps this is something that should be included in the help file? At any rate, saving into my Documents folder using an absolute path worked great.
since rev.17574 [msgfile] should behave the same as [textfile] when writing to relative filenames.
(that is: the file is saved relative to the canvas, rather than relative to Pd's working directory - which can be / on OSX...)