From 7873938d18daf4a94ca77eeb970457f89e679374 Mon Sep 17 00:00:00 2001 From: Thomas Grill Date: Fri, 31 Dec 2004 04:58:29 +0000 Subject: fix for showing attributes on select (and recreate the object on edit) reconsidered flext::buffer:Update build system for flext-based externals added object construction and destruction flags svn path=/trunk/; revision=2438 --- externals/grill/flext/source/fllib.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'externals/grill/flext/source/fllib.cpp') diff --git a/externals/grill/flext/source/fllib.cpp b/externals/grill/flext/source/fllib.cpp index 509ba2c2..2132ddf2 100755 --- a/externals/grill/flext/source/fllib.cpp +++ b/externals/grill/flext/source/fllib.cpp @@ -413,6 +413,7 @@ flext_hdr *flext_obj::obj_new(const t_symbol *s,int _argc_,t_atom *argv) flext_obj::m_holder = obj; flext_obj::m_holdname = s; flext_obj::m_holdattr = lo->attr; + flext_obj::initing = true; // get actual flext object (newfun calls "new flext_obj()") if(lo->argc >= 0) @@ -446,6 +447,8 @@ flext_hdr *flext_obj::obj_new(const t_symbol *s,int _argc_,t_atom *argv) // here, inlets, outlets, methods and attributes can be set up ok = obj->data->Init(); + flext_obj::initing = false; + // call another virtual init function if(ok) ok = obj->data->Finalize(); @@ -467,6 +470,8 @@ flext_hdr *flext_obj::obj_new(const t_symbol *s,int _argc_,t_atom *argv) ok = false; } + flext_obj::initing = false; + if(!ok) { // there was some init error, free object lo->freefun(obj); @@ -500,6 +505,8 @@ void flext_obj::obj_free(flext_hdr *h) if(lcl) { try { + flext_obj::exiting = true; + // call virtual exit function hdr->data->Exit(); @@ -515,7 +522,9 @@ void flext_obj::obj_free(flext_hdr *h) catch(...) { error("%s - Unknown exception while destroying object",GetString(name)); } - } + + flext_obj::exiting = false; + } #ifdef FLEXT_DEBUG else #if FLEXT_SYS == FLEXT_SYS_MAX -- cgit v1.2.1