intro to jsextensions folder please?

jamesson's icon

Could someone please post a brief intro/tutorial for the jsextensions folder?

Thanks

Joe

Luke Hall's icon

If you have any javascript objects (functions/constants/etc) that you want to be available globally in every [js] object, then save them in the jsextensions folder as a new file (this way the file won't get overwritten during incremental software updates to max as a whole). It's like being able to #include snippets of code that you find most useful and use repeatedly.

For example I have a file in jsextensions that includes a functions for parsing @style attributes typed in to the [js] object - much easier to call one line of code than copy/paste the whole lot into every javascript I write!

jamesson's icon

Luke

Many thanks for the info

1 question

if I make a standalone, will the jsextensions get packaged with it?

Luke Hall's icon

I have absolutely no idea but I would guess perhaps yes. Test it out and reply back and then everyone will know for sure!

dhjdhjdhj's icon

Whats the benefit?I have JavaScript files in one of my folders outside the Max installation but in the max search path. They are really visible to my projects and won't get deleted if I upgrade max?

jamesson's icon

dhj: did u try making standalone?

If so, success?

If success, could you post specific instructions?

Thanks

Joe

dhjdhjdhj's icon

I've never tried to make a standalone. Are you suggesting that js files don't get picked up for standalones unless they are in that special folder?

jamesson's icon

dhj: no, the opposite

dhjdhjdhj's icon

If that's the case, then what's the problem -- you put them in a folder in your search path and they'll get picked up!

jamesson's icon

I haven't done standalone at all yet, but thanks tons for the info

Joe