Commit 70b441e4 authored by thomas's avatar thomas
Browse files

no message


git-svn-id: https://svn.grrrr.org/ext/trunk@362 4d9ac71a-51e6-0310-8455-cad1006bcd31
parent 5e039cb0
......@@ -140,7 +140,7 @@ bool flext_base::SetAttrib(const t_symbol *tag,int argc,const t_atom *argv)
post("%s - attribute %s has no get method",thisName(),GetString(tag));
}
else
error("%s - %s: attribute not found",thisName(),tag);
error("%s - %s: attribute not found",thisName(),GetString(tag));
return true;
}
......@@ -189,7 +189,7 @@ bool flext_base::GetAttrib(const t_symbol *tag,int argc,const t_atom *argv)
post("%s - attribute %s has no set method",thisName(),GetString(tag));
}
else
error("%s - %s: attribute not found",thisName(),tag);
error("%s - %s: attribute not found",thisName(),GetString(tag));
return true;
}
......@@ -27,6 +27,8 @@ WARRANTIES, see the file, "license.txt," in this distribution.
flext_hdr *flext_obj::m_holder = NULL;
const t_symbol *flext_obj::m_holdname = NULL;
bool flext_obj::m_holdattr = false;
int flext_obj::m_holdaargc = 0;
const t_atom *flext_obj::m_holdaargv = NULL;
bool flext_obj::process_attributes = false;
/////////////////////////////////////////////////////////
......
......@@ -236,8 +236,10 @@ class flext_obj:
//! Hold object's name during construction
static const t_symbol *m_holdname;
//! Holder for attribute procession flag
//! Holders for attribute procession flag
static bool m_holdattr;
static int m_holdaargc;
static const t_atom *m_holdaargv;
//! The object's name in the patcher
const t_symbol *m_name;
......
......@@ -442,12 +442,18 @@ bool flext_base::Init()
delete[] list;
}
if(procattr) {
#ifdef PD
if(procattr)
// attribute dump outlet is the last one
outattr = (outlet *)newout_anything(&x_obj->obj);
#endif
// initialize creation attributes
if(m_holdaargc && m_holdaargv)
ok = InitAttrib(m_holdaargc,m_holdaargv);
}
return ok;
}
......
......@@ -335,13 +335,18 @@ flext_hdr *flext_obj::obj_new(const t_symbol *s,int _argc_,t_atom *argv)
// check constructor exit flag
obj->data->InitOk();
if(ok && lo->attr && argc < _argc_)
// set cmdline attributes (this is a flext_base function!)
ok = ((flext_base *)obj->data)->InitAttrib(_argc_-argc,argv+argc);
if(ok) {
// store creation args for attribute initialization (inside flext_base::Init())
flext_obj::m_holdaargc = _argc_-argc;
flext_obj::m_holdaargv = argv+argc;
if(ok) // call virtual init function
// call virtual init function
ok = obj->data->Init();
flext_obj::m_holdaargc = 0;
flext_obj::m_holdaargv = NULL;
}
if(!ok) {
// there was some init error, free object
lo->freefun(obj);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment