<br><br><div class="gmail_quote">On Sat, Feb 5, 2011 at 3:44 PM, Mathieu Bouchard <span dir="ltr">&lt;<a href="mailto:matju@artengine.ca">matju@artengine.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Tue, 25 Jan 2011, Rich E wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Ah, understood.  Thanks for the nice code explanation and references... they both really help.  <br>
I noticed that t_canvasenvironment remains privately defined, so it&#39;s difficult to use this struct.  To get the dollarzero, I saw this works:<br>
<br>
canvas_setcurrent(x_canvas);<br>
int dzero = canvas_getdollarzero();<br>
</blockquote>
<br></div></div>
That&#39;s an alias of pd_pushsym.<br>
You are supposed to use it with canvas_unsetcurrent (alias of pd_popsym), though I don&#39;t remember what can really go wrong if you don&#39;t unset/pop.<div><div></div><div class="h5"><br></div></div></blockquote><div>
<br></div><div>Lots of stuff goes wrong if you don&#39;t call canvas_unsetcurrent after setting it. :) I know because I was running into all sorts of EXC_BAD_ACCESS signals before doing it - specifically in some experiments in opening patches via x_canvas points. Thanks for the tip, Mathieu.  I actually got a couple other questions now that I have figured out a bit more, but I&#39;ll save it for another thread.. </div>
<div><br></div><div>Cheers,</div><div>Rich</div></div>