From a55a5773570e56a1fb59887f1215f3d05a055700 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Mon, 25 Nov 2002 22:27:34 +0000 Subject: "" svn path=/trunk/; revision=243 --- externals/grill/flext/source/flattr.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'externals/grill/flext/source/flattr.cpp') diff --git a/externals/grill/flext/source/flattr.cpp b/externals/grill/flext/source/flattr.cpp index 20b06e41..2739ae11 100644 --- a/externals/grill/flext/source/flattr.cpp +++ b/externals/grill/flext/source/flattr.cpp @@ -14,7 +14,12 @@ WARRANTIES, see the file, "license.txt," in this distribution. #include "flext.h" #include -#include + +#ifdef MAXMSP +#define STD std +#else +#define STD +#endif flext_base::attritem::attritem(const t_symbol *t,const t_symbol *gt,metharg tp,methfun gf,methfun sf): tag(t),gtag(gt),argtp(tp),gfun(gf),sfun(sf),nxt(NULL) @@ -40,8 +45,8 @@ void flext_base::AddAttrItem(attritem *m) void flext_base::AddAttrib(const char *attr,metharg tp,methfun gfun,methfun sfun) { if(procattr) { - char tmp[1024]; - sprintf(tmp,"get%s",attr); + char tmp[256] = "get"; + strcpy(tmp+3,attr); AddAttrItem(new attritem(MakeSymbol(attr),MakeSymbol(tmp),tp,gfun,sfun)); AddMethod(0,attr,(methfun)cb_SetAttrib,a_any,a_null); @@ -80,7 +85,7 @@ bool flext_base::ListAttrib() attritem *a = attrhead; for(int i = 0; i < attrcnt; ++i,a = a->nxt) SetSymbol(la[i],a->tag); - ToOutAnything(outattr,thisTag(),la.Count(),la.Atoms()); + ToOutAnything(outattr,MakeSymbol("attributes"),la.Count(),la.Atoms()); return true; } else @@ -135,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; } @@ -184,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; } -- cgit v1.2.1