Some javascript questions

dhk's icon

Hello,

I just started learning javascript for use in Max. I'm getting some results, but lots of questions emerge ? some of which certainly is down to me being a newbie in that kind of programming. But some maybe also due to the Max documentation not being so easy for me to find my way around as the regular Max part. I'm exposing you guys to a couple of them here:

How do I proceed to make, say, a panel with specific attributes such as pixel dimensions, background/border color, etc.. I've managed to create a panel through the newdefault method (and alter these attributes after the creation), but the newobject is very scarcely documented.

I'd also like to set arguments and flags at creation time, like in this example:

Max Patch
Copy patch and select New From Clipboard in Max.

- making a new subpatcher with the specified size at creation time, setting the new window's flags (like nozoom) at creation time, and possibly preventing the new window form opening until I say so. Creating a jsui object inside with a file nameas an argument. Again, I know how to do most of this using newdefault, but I have no clue as to how to use newobject, nor to where I can find information about these things so I won't have to bother you nice forum folks with my problems.

In general, I'd be thankful for any additional info on how to translate my knowledge of scripting in the thispatcher context into a js one. I know and use some nice javascript resources like CoreGuideJS15 and www.javascript-reference.info, but they're of little help when it comes to how javascript interfaces with Max.

dhk's icon

I'm sorry, I didn't even know there's a dedicated javascript forum. I'll look at some posts there, and maype repost this thread thereif I don't find what I'm looking for.

Still, if anyone decides to make a reply in this thread, there's nothing I can do to prevent that ;-)

wallace winfrey's icon

Moving this thread to JavaScript...