Auvi objects in Javascript

    Oct 01 2010 | 8:56 pm
    I'm trying to create an Auvi object inside a js object, like so:
    var abstract = new JitterObject("au.abstract");
    ...but receive the error:
    missing arguments for message "au_abstract"
    Outside of js, the object instantiates fine without any arguments.
    For what it's worth, in the original Auvi C code, the class name is defined as "au_abstract" and the matrix calculation method as "jit_abstract_matrix_calc(...etc...)"
    Thanks for your help,

    • Oct 01 2010 | 11:02 pm
      Hi Kurt,
      As long as all of your functionality is in your Jitter class and not the Max wrapper class, the solution is simple, but it will require a recompile. You just need to make your jitter constructor typed--i.e. not A_CANT. So if you need to get arguments, you should use A_GIMME. If you don't take any arguments internal to your au_ class constructor, you can just remove the A_CANT.
      For more details, please see the Jitter Object Model "constructor/destructor" section from the SDK.
      "In earlier versions of Jitter, the constructors were often specified as private and "untyped" using the A_CANT type signature. While this obsolete style of an untyped constructor will work for the exposure of a Jitter class to the patcher and C, it is now discouraged, as there must be a valid type signature for exposure of a class to Javascript or Java, though that signature may be the empty list."
      Let us know if you encounter any problems.
    • Oct 02 2010 | 1:10 am
      Hi Joshua,
      Thanks -- worked perfectly!
      I will add this into the the next Auvi update (...which, realistically, might not be until the end of the year).
      All best,