can't define atoms as attribute type with min devkit
Hi, i would like to store the content of a dict in a pattr, using the special Value attribute defined as explained in the mindev kit :
attribute<symbol> m_value { this, "value", "DEFAULT",
setter {
MIN_FUNCTION {
using namespace c74::max;
t_max_err ee = dictobj_dictionaryfromatoms(&my_dict.m_instance, args.size(),&args[0]);
if (!ee)
{
std::cout << " dict correctly filled : " << convertDICTtoJSON(my_dict).c_str() << "\n";
}
return args;
}
}
,
getter { MIN_GETTER_FUNCTION {
using namespace c74::max;
long argc;
t_atom atomss[2048];
t_atom * argv = &atomss[0];
std::cout << " converting this dict to atoms " << convertDICTtoJSON(my_dict).c_str() << "\n";
t_max_err ee = dictobj_dictionarytoatoms(my_dict.m_instance,&argc,&argv);
if (!ee)
{
atoms atms;
for (int i = 0 ; i < argc ; i++)
{
atms.push_back(atomss[i]);
}
return atms;
}
else
{
return {"EMPTY"};
}
}}
};
But i really couldn't understand how to store in the attribute vector of several atoms so that my dict could be stored in the pattr, and not only one symbol...
I would appreciate any help
thks