You probably want to call  canvas_makefilename(), supplying the owning canvas,
not a new one.  YOu can get the owning canvas using canvas_getcurrent(), 
but only when the object is being created (the information is not kept so
your object needs to keep it itself).  For a simple example, search
pd/extra/bink~/bonk~.c for x->x_canvas - it gets intialized in the new()
methnd and used both to create and read files.

cheers
Miller

On Sun, Jun 29, 2014 at 05:49:23PM -0500, Jaime E Oliver via Pd-list wrote:
> Hi all, 
> 
> Checking out  canvas_open inside g_canvas.c, I realize that this is a 
> function to open a file that already exists, while what I am trying to do is 
> write a file with a path that is relative to the canvas. I couldn't find 
> something similar, such as canvas_write or such.
> 
> thanks again!
> 
> J
> 
> 
> _______________________________________________
> [email protected] mailing list
> UNSUBSCRIBE and account-management -> 
> http://lists.puredata.info/listinfo/pd-list

_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to