[javascript-dev] creating files problem in a standalone
Jean-Baptiste Thiebaut
pplato at gmail.com
Mon Jan 21 11:01:24 MST 2008
- Previous message: [javascript-dev] Re: creating a buffer~ object in javascript
- Next message: [javascript-dev] creating files problem in a standalone
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I'm using the code below to save data in a file. This works well as long as I'm working with Max, but it doesn't write in the file when I run the standalone program. I am able to read the file though.
In the code below, I'm posting a message if the system cannot open the file. I never get this message on the console, so I presume that the standalone can create or open the file, but maybe only in read mode? In fact, the data stored in these file can be read but cannot be changed in the standalone version of my program.
Thanks for your help.
Jean-Baptiste
function save(n)
{
var cpt = n%8;
var f = new File("bkp"+cpt,"readwrite");
var s = new Array(4);
if (f.isopen)
{
f.writefloat32(Math.PI);
f.close();
post("
The file ",f.foldername,f.filename,"has beed saved");
} else {
post("could not create file: ",f , "
");
}
}
- Previous message: [javascript-dev] Re: creating a buffer~ object in javascript
- Next message: [javascript-dev] creating files problem in a standalone
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
