IDE and autocomplete with Javascript in Max , How to
Hi everyone,
When i normally code in Visual studio with my IDE or with sublime text 3. I have really nifty autocomplete function, as i type matching functions and methods appear and coding becomes slightly easier than it was before.
So my question is this.
How do i get this to work in Max ? or more importantly, how do i get my IDE (lets say sublime text 3 ) to know whats available in Max javascript ?
I'm on windows 7 , max 7.
Still wish there was a clear tutorial for this...
Any and all advice welcome !
I don't know about the IDE's but these tutorial videos helped me out a bit with Javascript inside Max, maybe it is of some use to you
Also have you read all the Javascript tutorials in the Reference documents?
Hi Bxne, thanks for the tips ! I'll check out the videos and I noticed that the max documentation finally got some love after so many years, so I'll check that out as well.
Up!
It would be nice to have type declarations (*.d.ts) so we can use it in any IDE.
Just wanted to revive this thread. Does anyone know if its possible to switch out the Javascript IDE used by Max to one that supports autocomplete?
Hey good timing! I just did a bunch of work on a fork of TypeScript-for-Max by @THORSTEN ØRTS that still needs a bit of testing but so far seems to be running well. I’ve updated the TypeScript definitions for Max 8 and have been cleaning up the project to the best of my ability. There are definitely still some holes in the implementation, but I'm combing through the docs and adding whatever I find.
I’ve added some Gulp automation to streamline the build process. I adapted some js examples from the forum to use for testing as well. I've been running this as a WebStorm project, and it's really pretty neat. It should be fine in VSCode too.
This has been a learning process for me, as I started with next to no knowledge of TypeScript, and I've found the transition from JavaScript to be fairly painless. I mainly just started doing this for my own personal use and to learn some new programming tricks. I'll try submitting a pull request if enough people test this and it actually works, but it's possible I made too many opinionated choices about how to resolve the typings. It would be great to know if anything is currently broken for anyone.
Please check out my fork here and let me know if it's working for you.
Thank you Sadguitarius, nice work!
Does anyone have type declarations for the node4max api?
You can always change the editor Max uses for text files from the Max preferences:
Interface->Always Use External Text Editor
Interface->External Text Editor