simplejs

Feb 5, 2010 at 10:25am

simplejs

Has anyone been able to get the simplejs example project to work? My Max just complains js: simplejs_test.js: Javascript ReferenceError: SimpleJS is not defined, line 0

I’m sure that the mxe file is on the path because i can instantiate a simplejs object in a patcher.

/brian

#48250
Feb 5, 2010 at 1:10pm

Did you modify maxclasswrap.js in the C74:/jsextensions/ folder?

#173538
Feb 5, 2010 at 5:32pm

no, but that keyword (maxclasswrap) has suddenly made my searches of the forums much more fruitful. thanks.

#173539
Feb 5, 2010 at 9:01pm

So I got this working. I’m thinking that given the extra hoop a user would have to go through to use this (getting the class wrapped), maybe for something intended for distribution to less advanced users a Jitter object is still the way to go.

On the other hand, it doesn’t look like there’s any harm in having the class wrapped repeatedly, besides an error message in the max window. I suppose I could just say “make sure you include the line maxclasswrap("myclass", "MyClass") in your script.” It doesn’t really seem any more ornery than making them do new JitterObject("MyClass") where it should ideally be new MyClass().

What do you people out there in internet-land think?

Or is there some other way to make a js-addressable object without these hoops that I’m just ignorant of?

#173540
Feb 5, 2010 at 10:13pm

You could create the nobox object in a C object and send messages as well.

#173541
Feb 6, 2010 at 6:33am

Isn’t that what I’m doing (making a nobox object) when making the class that I then wrap using maxclasswrap? Or is there some other detail here I’m missing?

Sorry if I’m coming across as dense, the documentation on this is less than explicit.

#173542

You must be logged in to reply to this topic.