Cannot set id on a live.object


    Aug 13 2017 | 7:39 pm
    Hi, trying to set the id of a live.object using the following code but get an error message saying that live.object doesn't understand id. Anyone any ideas? thx t_atom rv; long id_long = id;
    t_object *p_obj = newobject_sprintf( p_patcher, "@maxclass newobj @text \"live.object\" @patching_position %d %d", 100, 100 );
    object_method_long( p_obj, gensym( "id" ), id_long, &rv );

    • Aug 14 2017 | 1:16 pm
      I've also tried sending a typed message in but get the same error: t_atom args[ 1 ]; atom_setlong( args, id ); object_method_typed( p_obj, gensym( "id" ), 1, args, &rv );
    • Aug 14 2017 | 2:27 pm
      Doh, forgot that I was sending a message:
      t_atom args[ 2 ]; atom_setsym( args, gensym( "id" ) ); atom_setlong( args + 1, id ); object_method_typed( m_p_live_obj, gensym( "message" ), 2, args, &rv );