[PD-dev] Re: accessing canvas-local path from an external?

Hans-Christoph Steiner hans at eds.org
Thu Nov 23 15:17:41 CET 2006

Since I figured this out, I thought I'd reply to my own message.   
Basically, I didn't realize that the canvas variable could have been  
NULL.  That's what was happening.  Now I am testing for NULL, and  
things seem promising.


On Nov 20, 2006, at 12:47 AM, Hans-Christoph Steiner wrote:

> I am trying to write a loader to support libdirs in Pd-0.40.  I  
> would like to use the new ce_path (i.e. canvas-local path), but I  
> can't find a way to access and change it from an external.
> I tried using the t_canvas pointer that the loader gets from Pd  
> when it gets called, then directly accessing the namelist (canvas- 
> >gl_env->ce_path) but that caused a crash.  Then I tried getting a  
> t_canvasenvironment with:
> t_canvasenvironment *canvasenvironment = canvas_getenv(canvas);
> But I get: consistency check failed: canvas_getenv
> This loader works fine if it just writes to the global path,  
> sys_searchpath, but I would like it to use the new local namespace  
> feature.  Here's the code:
> http://pure-data.cvs.sourceforge.net/pure-data/externals/loaders/ 
> libdir.c
> .hc
> ---------------------------------------------------------------------- 
> --
> If you are not part of the solution, you are part of the problem.



More information about the Pd-dev mailing list