void data_list(TTPtr self, t_symbol *msg, long argc, const t_atom *argv)
{
	WrappedModularInstancePtr	x = (WrappedModularInstancePtr)self;
    TTObject o;
	
	if (!x->internals->isEmpty()) {
		
		// send to each data
		if (x->arrayIndex == 0) {
            
			TTValue keys;
			
            x->internals->getKeys(keys);
            for (TTUInt32 i = 0; i < keys.size(); i++) {
                x->cursor = keys[i];
                o = selectedObject;
                jamoma_data_command(o, msg, argc, argv);
            }
            
            // watch an instance by default
            x->cursor = keys[0];
		}
		else {
            o = selectedObject;
			jamoma_data_command(o, msg, argc, argv);
        }
		
	}
	else
		object_error((t_object*)x, "list : the array is empty");
}
void data_array(TTPtr self, t_symbol *msg, long argc, const t_atom *argv)
{
    WrappedModularInstancePtr	x = (WrappedModularInstancePtr)self;
    TTInt32     d, i;
    t_symbol	*instanceAddress;
    TTSymbol    memoCursor;
    
	if (!x->internals->isEmpty()) {
		
		// is the incoming data size is a multiple of the array size ?
        d = argc / x->arraySize;
        if ((d * x->arraySize) == argc) {
            
            memoCursor = x->cursor;
            
            for (i = 1; i <= x->arraySize; i++) {
                
                jamoma_edit_numeric_instance(x->arrayFormatInteger, &instanceAddress, i);
                x->cursor = TTSymbol(instanceAddress->s_name);
                TTObject o = selectedObject;
                jamoma_data_command(o, _sym_nothing, d, argv+((i-1)*d));
            }
            
            x->cursor = memoCursor;
        }
        else
            object_error((t_object*)x, "array : the array message size have to be a multiple of the array size");
		
	}
	else
		object_error((t_object*)x, "array : the array is empty");
}
Exemple #3
0
void data_list(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
{
	WrappedModularInstancePtr	x = (WrappedModularInstancePtr)self;

	jamoma_data_command(x->wrappedObject, msg, argc, argv);
    
    // to warn attr ui for example
    object_attr_touch((t_object*)x, _sym_value);
}
Exemple #4
0
void WrappedDataClass_anything(TTPtr self, t_symbol *msg, long argc, t_atom *argv)
{
	WrappedModularInstancePtr	x = (WrappedModularInstancePtr)self;
	
	jamoma_data_command(x->wrappedObject, msg, argc, argv);
}