<div dir="ltr">actually, the function take a t_object* as an argument, not a pointer to the class structure<div>is there a way to access the class a t_object belong to from the t_object itself ?</div><div>if no, I will have to change each call to that function to pass a class structure pointer instead of just the t_object.</div><div>but correct me if i'm wrong</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 21:21 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><div>You would only need to rewrite the function that max used (since it won't exist otherwise anyway), and have it retrieve the value from the class struct instead.<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888">Martin<br></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 3, 2015 at 2:26 PM, Antoine Villeret <span dir="ltr"><<a href="mailto:antoine.villeret@gmail.com" target="_blank">antoine.villeret@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><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>+<span><font color="#888888"><br>a</font></span></div></div><div class="gmail_extra"><span><br clear="all"><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>
<br></span><div><div><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>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><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></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>