hi
removed all those who receive this mail anyhow, because they are subscribed to the list.
Matteo Sisti Sette wrote:
Matteo Sisti Sette escribió:
Hans-Christoph Steiner escribió:
I wrote an external called [sys_gui] that allows you to send Tcl to the GUI from Pd. While you can't (yet?) use {} you can use "" and [] and that gets you a long way.
GREAT! I think that solves all my "problems" :)
Oh no!!!! Almost!
If I create a directory and then, _immediately_ after (in the same message tree, after 0 logical time), I send a [write ...( message to a [textfile] to save a file into the newly created folder, it fails because (I guess) the creation of the folder is "non-blocking" (so to say) that is it takes a small time to create it but the action is considered finished (and the following branch of messages is generated) as soon as the "command has been sent".
it's not about non-blocking. but [sys_gui] sends a request over the internet to your local computer to create a directory. since the internet can take some time, so will your folder creation. even though the connection to your local computer should be pretty fast, it is still asynchronous to your main patch.
Any suggestions on how to check for the existence of a directory?
well, write a textfile into the folder with some content and try to retrieve the content. if it succeeded, then the folder is there. (and writeable; in order to don't create any locks because you try to wirte to a non-writeable folder, make sure to do some timeout)
fgmasdr IOhannes