<div dir="ltr">hi, <div><br></div><div>thanks for your answer, but I was wondering if there is a way to retrieve it without saving it.</div><div>I'm porting a Max lib to Pd which uses such a thing in Max (which is possible since SDK 6).</div><div>If it's not possible I would have to rewrite *a lot* of the lib code. :-(</div><div><br></div><div>+<br>a</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">--<br>do it yourself                       <br><a href="http://antoine.villeret.free.fr" target="_blank">http://antoine.villeret.free.fr</a><br></div></div>
<br><div class="gmail_quote">2015-03-03 19:52 GMT+01:00 Martin Peach <span dir="ltr"><<a href="mailto:chakekatzil@gmail.com" target="_blank">chakekatzil@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>You could save the pointer in your class struct during the new method.<br><br></div>Maritn<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Mar 3, 2015 at 11:52 AM, Antoine Villeret <span dir="ltr"><<a href="mailto:antoine.villeret@gmail.com" target="_blank">antoine.villeret@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi, <div><br></div><div>I would like to retrieve at any time the pointer to the t_canvas containing my object.</div><div>Is that possible ?</div><div>I know I can retrieve it with something like : </div><div><div>    t_glist *glist=(t_glist *)canvas_getcurrent();</div><div>    t_canvas *canvas=(t_canvas*)glist_getcanvas(glist);</div></div><div>in the myobject_new() method.</div><div><br></div><div>But the same give me a (nil) t_canvas pointer outside the new() method.</div><div><br></div><div>Thanks in advance.</div><div><br></div><div>Antoine</div><div><br></div><div><br></div><div><div><div>--<br>do it yourself                       <br><a href="http://antoine.villeret.free.fr" target="_blank">http://antoine.villeret.free.fr</a><br></div></div>
</div></div>
<br></div></div>_______________________________________________<br>
<a href="mailto:Pd-list@lists.iem.at" target="_blank">Pd-list@lists.iem.at</a> mailing list<br>
UNSUBSCRIBE and account-management -> <a href="http://lists.puredata.info/listinfo/pd-list" target="_blank">http://lists.puredata.info/listinfo/pd-list</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>