<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 4, 2013 at 11:36 AM, Jonathan Wilkes <span dir="ltr">&lt;<a href="mailto:jancsika@yahoo.com" target="_blank">jancsika@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">----- Original Message -----<br>
&gt; From: IOhannes zmölnig &lt;<a href="mailto:zmoelnig@iem.at">zmoelnig@iem.at</a>&gt;<br>
&gt; To: <a href="mailto:pd-dev@iem.at">pd-dev@iem.at</a><br>
&gt; Cc:<br>
&gt; Sent: Friday, January 4, 2013 4:43 AM<br>
&gt; Subject: Re: [PD-dev] from t_symbol to t_class<br>
&gt;<br>
&gt; On 01/04/2013 07:19 AM, Miller Puckette wrote:<br>
&gt;&gt;  I think you&#39;re safe calling vmess() to pass no arguments to clip_new<br>
&gt;&gt;  (for example) - the worst that can happen is the &quot;return value&quot;<br>
&gt; (the<br>
&gt;&gt;  global &quot;newest&quot; is zero.  If not it&#39;s a proper Pd object you<br>
&gt; can use zgetfn()<br>
&gt;&gt;  on to test it for messages.<br>
&gt;&gt;<br>
&gt;&gt;  Main problem I see with this is that some classes like &quot;select&quot;<br>
&gt; and &quot;list&quot;<br>
&gt;&gt;  are actually several classes that share a name (and which one gets created<br>
&gt;&gt;  depends on the arguments sent to vmess())<br>
&gt;<br>
&gt;<br>
&gt; also, what happens if the object in question accesses some hardware ressource?<br>
&gt; e.g. [pix_video] will try to grab an available video-source, potentially locking<br>
&gt; a hardware device.<br>
&gt; in theory this should not be aproblem, as the object will hopefully be freed by<br>
&gt; [classinfo] asap, but in practice it might have all kinds of side-effects,<br>
&gt; starting from short lockups of Pd to launching rockets.<br>
<br>
</div>I&#39;d prefer to just inspect the class without creating a new instance but I can&#39;t<br>
figure out how.<br>
 <br>
Are all t_gobj linked together in one big list?<br>
<span class=""><font color="#888888"> <br>
-Jonathan</font></span><br></blockquote><div><br><div>I think the t_gobj are in a list per canvas--see the canvas_dodsp method in g_canvas.c to see how it&#39;s done.<br><br></div>
<div>Classes in Pd exist without having an instance of the class.  Once 
the setup method is called (which for externals will require you to 
create an instance), the class data structure is created and loaded with
 all its methods.  <br>
</div><div>However, I don&#39;t know how to get a pointer to the class, when all you know is the symbol.<br></div><div><br>Within
 a class, the methods are stored in an array &quot;c_methods&quot;.  See the class
 definition in m_imp.h.  You can dump out all the symbols that have 
methods by looping over the array from 0 to (c_nmethod-1) and accessing 
the method&#39;s &quot;me_name&quot;.<br>
<br></div>Chuck <br></div></div></div></div>