From b71e257899abcb9a8bee4e7d967bb653c03890d4 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Wed, 19 Jan 2005 04:59:59 +0000 Subject: - strip .pd from abstraction filenames - open debug patcher on alt-click svn path=/trunk/; revision=2525 --- externals/grill/dynext/dynext.vcproj | 6 +++--- externals/grill/dynext/pd/help-dyn~.pd | 36 +++++++++++++++++----------------- externals/grill/dynext/readme.txt | 24 +++++------------------ externals/grill/dynext/src/main.cpp | 25 +++++++++++++++++++---- 4 files changed, 47 insertions(+), 44 deletions(-) (limited to 'externals') diff --git a/externals/grill/dynext/dynext.vcproj b/externals/grill/dynext/dynext.vcproj index 7d2121fe..b0346f05 100644 --- a/externals/grill/dynext/dynext.vcproj +++ b/externals/grill/dynext/dynext.vcproj @@ -20,7 +20,7 @@ -#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 406) -#error You need at least flext version 0.4.6 +#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 500) +#error You need at least flext version 0.5.0 #endif #define DYN_VERSION "0.1.1pre" @@ -55,6 +55,8 @@ public: protected: + virtual void m_click() { m_vis(true); } + static const t_symbol *k_obj,*k_msg,*k_text; class obj { @@ -196,7 +198,7 @@ const t_symbol *dyn::sym_dsp = NULL; void dyn::setup(t_classid c) { post(""); - post("dyn~ %s - dynamic object management, (C)2003-04 Thomas Grill",DYN_VERSION); + post("dyn~ %s - dynamic object management, (C)2003-2005 Thomas Grill",DYN_VERSION); post(""); sym_dynsin = MakeSymbol("dyn_in~"); @@ -455,6 +457,21 @@ t_gobj *dyn::New(const t_symbol *kind,int _argc_,const t_atom *_argv_,bool add) else if(!canv || !(glist = FindCanvas(canv))) err = "Canvas could not be found"; else { + // convert abstraction filenames + if(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 + if(l >= 4 && !memcmp(c+l-3,".pd",4)) { + // found -> get rid of it + char tmp[64],*t = tmp; + if(l > sizeof tmp-1) t = new char[l+1]; + memcpy(tmp,c,l-3); tmp[l-3] = 0; + SetString(argv[2],tmp); + if(tmp != t) delete[] t; + } + } + // set selected canvas as current canvas_setcurrent(glist); -- cgit v1.2.1