javascript problem

Ullstein's icon

Instaling a Mac with a Max/MSP patch and a touch screen monitor, from which visitors can have some influence on the content, this problem appears:
Usually the patch is in presentation mode, so that audience cannot access the patch behind it. I found a nice way to open the patch through the touch screen but then it is not in EDIT-mode. I found a javascript file "js vj.lock" which can lock or unlock the patch. I found a way to allow lock and unlock with this. Only one problem, it loses its content. Every now and then the object is empty. I don't understand why that happens, nor what the reason for that is. Anybody with an idea? Many thanks in advance...

Rob Ramirez's icon

my guess is filepath issue. make sure the js is in the filepath (not simply in the current working dir, which can change depending on the last opened file)

Ullstein's icon

Thanks Rob, I will see, if that will work, if not I will come back ... Many thanks

Ullstein's icon

Sorry Rob, I cannot make it work, now the object is empty again. Honestly I forgot where I found it but I added the "java items "folder into the max8/library folder. And I saved the "js vj.lock"object into the path of my project in the folder "other". But when I open my patch it's empty again (and not functioning). Can you give me some more detailed info, like:
· where is the file located
· where exactly shall I save it

Or else, is there any other way to switch between lock and unlock without the need of one of the modifiers?

Thanks again for your attention

Ullstein's icon

OK, one more time: I saved the js vj.lock object also into the Documents/Max 8/Projects/"project_name"/patchers/ folder and it seems to be stable now. FX... Thanks

11OLSEN's icon

Just in case, [thispatcher] can change the locked state.

Ullstein's icon

11Olsen: Great and many thanks. Simple and good

All the best