cannot write to pattrstorage files in a Windows standalone -- permissions?

mattyo's icon

List!

I'm working on a cross-platform standalone, and having problems getting my pattrstorage preference files to save under Windows. the .json files are inside the application itself, in the support folder -- as I'm loading them manually, I know that the path to the folder I'm using(app_foldersupportdata) is being read by the patch, but I get a -1 error when a writeagain message is sent. Checking the properties of that folder, I noticed that it is marked read-only. After nosing around the internets for Windows, I changed variousl settings, only to find that once I closed the folder and reopened it, the read-only flag turned itself on again. Is there a workaround for this, or do I have to stick my settings files somewhere else?

I note that Windows has the "documents and Settings" folder -- is that the place I have to write the .json files to? Or is there some trick to get my permissions change to stick?

Thanks,

M

Léopold Frey's icon
mattyo's icon

Thanks for the pointer, but I'm aware of all of those issues and I'm loading my .jsons manually and so forth. The Mac build has no problem storing settings changes -- it is only the Windows build, which makes me think it may be an OS issue rather than a Max issue....

M

mattyo's icon

never mind -- sorted it out...

m

StvDee's icon

I also had a similar problem. I tried everything to save my json files in Windows with no luck. Everytime I re-opened the program and sent the read command to pattrstorage with the correct filepath I could never read the file contents. I tried every syntax for the filepath with no luck (max version 5.0.7, WinXP-32bit). I sorted it out by changing the json files to xml. I had the exactly same problem on my MacPro, only that time I couldn't save anything using xml, but instead I used json and everything worked.

So I guess if anyone has similar problems try changing json and xml files to see what works best for you.

Cheers!

Ben Bracken's icon

Stav,

Again, please update to the latest version, 5.1.4. Send an email to support if you find that json file read/write does not work as expected.

-Ben

SpaceSpud96's icon

@Mattyo

Hey man, reviving this thread quickly...

I have exactly the same problem as you right now... My app works flawlessly on Mac... XML's read and write fine (included the xml in the package contents).

Now on windows, and it won't writeagain to the xml file... Took your advice and checked the read status of the app folder and it's set to 'read-only'... Changed the attribute and tried again, only to find out, that the minute you hit 'ok' it just reverts back to 'read-only'.

What was your solution that you came up with? I basically need this to work and then the windows counterpart will work fine heh... the reading is good, it's just the writing I'm having an issue with.

Thanks in advance for the help!

mattyo's icon

Lord, I don't remember, honestly. I usually don't use PCs, it was something special for a client, and a million years ago -- sorry I can't be of more help....
\M

SpaceSpud96's icon

Hahah, no worries then dude, I'm talking with C74 team about it anyway, we should get this sorted soon! Will post a fix when i find it heh :D