diff options
author | Thomas Grill <xovo@users.sourceforge.net> | 2005-02-08 04:58:52 +0000 |
---|---|---|
committer | Thomas Grill <xovo@users.sourceforge.net> | 2005-02-08 04:58:52 +0000 |
commit | a2c6a0b52d1303257571422dfd35c96565cc86c3 (patch) | |
tree | 274294b1ac29b98c590f3fd2c3543c70622782eb /externals/grill/dynext/src | |
parent | 5e601537d89f146636d22524374caa02a473a758 (diff) |
- strip .pd from abstraction filenames
documentation
- open debug patcher on alt-click
svn path=/trunk/; revision=2562
Diffstat (limited to 'externals/grill/dynext/src')
-rw-r--r-- | externals/grill/dynext/src/main.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/externals/grill/dynext/src/main.cpp b/externals/grill/dynext/src/main.cpp index 07b3b5e4..362963c5 100644 --- a/externals/grill/dynext/src/main.cpp +++ b/externals/grill/dynext/src/main.cpp @@ -11,6 +11,8 @@ WARRANTIES, see the file, "license.txt," in this distribution. */ +#define FLEXT_ATTRIBUTES 1 + #include <flext.h> #if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 500) @@ -154,6 +156,7 @@ protected: int m_inlets,s_inlets,m_outlets,s_outlets; t_canvas *canvas; + bool stripext; private: static void setup(t_classid c); @@ -169,6 +172,8 @@ private: FLEXT_CALLBACK_V(m_send) FLEXT_CALLBACK_B(m_vis) + FLEXT_ATTRVAR_B(stripext) + static const t_symbol *sym_dot,*sym_dynsin,*sym_dynsout,*sym_dynin,*sym_dynout,*sym_dyncanvas; static const t_symbol *sym_vis,*sym_loadbang,*sym_dsp; }; @@ -239,6 +244,8 @@ void dyn::setup(t_classid c) FLEXT_CADDMETHOD_(c,0,"send",m_send); FLEXT_CADDMETHOD_(c,0,"vis",m_vis); + FLEXT_CADDATTR_VAR1(c,"stripext",stripext); + // set up symbols k_obj = MakeSymbol("obj"); k_msg = MakeSymbol("msg"); @@ -285,7 +292,8 @@ In all cases the 1)s have been chosen as the cleaner solution dyn::dyn(int argc,const t_atom *argv): root(NULL), canvas(NULL), - pxin(NULL),pxout(NULL) + pxin(NULL),pxout(NULL), + stripext(false) { if(argc < 4) { post("%s - Syntax: dyn~ sig-ins msg-ins sig-outs msg-outs",thisName()); @@ -458,7 +466,7 @@ t_gobj *dyn::New(const t_symbol *kind,int _argc_,const t_atom *_argv_,bool add) err = "Canvas could not be found"; else { // convert abstraction filenames - if(kind == k_obj && argc >= 3 && IsSymbol(argv[2])) { + if(stripext && kind == k_obj && argc >= 3 && IsSymbol(argv[2])) { const char *c = GetString(argv[2]); int l = strlen(c); // check end of string for .pd file extension @@ -472,7 +480,7 @@ t_gobj *dyn::New(const t_symbol *kind,int _argc_,const t_atom *_argv_,bool add) } } - // set selected canvas as current + // set selected canvas as current canvas_setcurrent(glist); t_gobj *last = GetLast(glist); |